forked from steemit/condenser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev.config.js
37 lines (35 loc) · 1.07 KB
/
dev.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const webpack = require('webpack');
const git = require('git-rev-sync');
const baseConfig = require('./base.config');
const startKoa = require('./utils/start-koa');
// var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
// baseConfig.plugins.push(new BundleAnalyzerPlugin());
module.exports = {
...baseConfig,
devtool: 'cheap-module-eval-source-map',
output: {
...baseConfig.output,
publicPath: '/assets/'
},
module: {
...baseConfig.module,
rules: [
...baseConfig.module.rules,
]
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
BROWSER: JSON.stringify(true),
NODE_ENV: JSON.stringify('development'),
VERSION: JSON.stringify(git.long())
}
}),
...baseConfig.plugins,
function () {
console.log("Please wait for app server startup (~60s)" +
" after webpack server startup...");
this.plugin('done', startKoa);
}
]
};