-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.js
38 lines (36 loc) · 967 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
38
/**
* @file webpack config
*/
const env = process.env.NODE_ENV || 'production';
console.log(env);
module.exports = {
entry: {
'list/list': './src/list/list.jsx',
'list/list-table': './src/list/list-table.jsx',
'chart/chart': './src/chart/chart.jsx',
'option/option': './src/option/option.jsx'
// vendor: ['react', 'react-dom']
},
output: {
filename: './dist/[name].js',
// publicPath: 'dist/demo'
},
module: {
rules: [
// dafa
{
test: /.jsx?$/,
loader: 'babel-loader'
},
{
test: /\.scss$/,
loaders: ['style-loader', 'css-loader', 'sass-loader']
},
// {
// test: /\.less$/,
// loaders: ['style-loader', 'css-loader', 'less-loader']
// }
]
},
watch: true || env !== 'production'
};