Skip to content

Commit

Permalink
fix: 修复 prd/loadable-stats.json 找不到的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongzhi107 committed Jun 17, 2019
1 parent 72e7f21 commit 5e6651e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/createServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ server
) : null;

// This is the stats file generated by webpack loadable plugin
const statsFile = path.resolve('./prd/loadable-stats.json');
const statsFile = path.resolve(process.env.DACE_LOADABLE_STATS_JSON);
// We create an extractor from the statsFile
const extractor = new ChunkExtractor({ statsFile });
// Wrap your application using "collectChunks"
Expand Down
3 changes: 3 additions & 0 deletions src/utils/defaultEnv.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export default {
// 服务器端编译产物输出目录位置
DACE_PATH_SERVER_DIST: 'dist',

// 客户端编译输出 stats 文件位置
DACE_LOADABLE_STATS_JSON: 'prd/loadable-stats.json',

// 创建 axios 实例文件位置
DACE_PATH_AXIOS_INSTANCE: 'node_modules/dace-plugin-redux/dist/runtime/axiosInstance.js'
};

0 comments on commit 5e6651e

Please sign in to comment.