Skip to content

Commit

Permalink
修改 config 到外侧
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmyu committed Dec 21, 2016
1 parent 566d768 commit a93f052
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 35 deletions.
32 changes: 0 additions & 32 deletions config.json

This file was deleted.

14 changes: 11 additions & 3 deletions src/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
const config = require('../config.json');
const config = require('../../config.json');
const common = {
path: {
caches: '../caches',
font: 'download/font',
svg: 'download/svg',
png: 'download/png',
},
};

const configPool = {
const configPool = config.production ? config : {
// 生产环境
production: {
...config,
Expand All @@ -24,4 +32,4 @@ const configPool = {
},
};

export default { ...configPool[process.env.NODE_ENV] };
export default { ...common, ...configPool[process.env.NODE_ENV] };

0 comments on commit a93f052

Please sign in to comment.