1、直接 import,例如: import config from "../../../package.json"; 2、在函数中调用,例如: console.log(config.version);