瀏覽代碼

fix a bug when build:prod

utsushiiro 7 年之前
父節點
當前提交
9acf4217c8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      config/webpack.common.js

+ 1 - 1
config/webpack.common.js

@@ -58,7 +58,7 @@ module.exports = (options) => {
     },
     resolve: {
       extensions: ['.js', '.jsx', '.json'],
-      modules: options.resolve.modules.concat([helpers.root('node_modules')]),
+      modules: ((options.resolve && options.resolve.modules) || []).concat([helpers.root('node_modules')]),
       alias: {
         '@root': helpers.root('/'),
         '@commons': helpers.root('src/lib'),