diff --git a/vue.config.js b/vue.config.js index a092bb50..e08f8071 100644 --- a/vue.config.js +++ b/vue.config.js @@ -52,6 +52,10 @@ module.exports = { // 重新设置 alias config.resolve.alias .set('@', resolve('src')) + // node + config.node + .set('__dirname', true) + .set('__filename', true) // babel-polyfill 加入 entry const entry = config.entry('app') entry