-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
37 lines (35 loc) · 903 Bytes
/
webpack.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 path = require('path')
const moduleRulesCommon = require('./webpack/moduleRulesCommon')
const moduleRulesBabel = require('./webpack/moduleRulesBabel')
const moduleAliases = require('./webpack/moduleAliases')
const development = process.env.NODE_ENV === 'development'
module.exports = {
devtool: 'eval',
entry: {
app: path.resolve(__dirname, 'src', 'entry.js'),
vendor: [ 'jquery', 'lodash', 'react', 'react-dom', 'prop-types' ]
},
resolve: {
alias: Object.assign({ }, moduleAliases,
{ 'mh-design$': require.resolve('./src/design') }
)
},
output: {
filename: '[name].bundle.js',
pathinfo: development
},
node: {
fs: 'empty'
},
module: {
rules: [
...moduleRulesBabel,
...moduleRulesCommon({ css: false })
]
},
plugins: require('./webpack/plugins'),
devServer: {
compress: true,
historyApiFallback: true
}
}