-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.base.js
39 lines (37 loc) · 1.09 KB
/
webpack.base.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
39
module.exports={
module:{
rules:[
{
test: /\.css$/,
loader: 'style-loader'
},
{
test: /\.css$/,
loader: 'css-loader',
query: {
modules: true,
localIdentName: '[local]'
}
},
{
test: /\.(eot|woff|woff2|ttf|svg|png|jpg|jpeg|gif)$/,
loader: 'url-loader?limit=30000&name=[name]-[hash].[ext]'
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /(node_modules|bower_components)/,
options: {
presets: [
"es2017", "stage-0", "react",
{'env': {
"plugins": ["transform-react-constant-elements"],
target: {browser: ['last 2 versions']}
}
}
]
}
}
]
}
};