-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwebpack.config.js
46 lines (39 loc) · 1021 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
39
40
41
42
43
44
45
46
var path = require('path');
var dir_js = path.resolve(__dirname, 'mylib');
var dir_build = path.resolve(__dirname, 'build');
var dir_html = path.resolve(__dirname, 'html');
var dir_css = path.resolve(__dirname, 'css');
var es3ifyPlugin = require('es3ify-webpack-plugin');
module.exports = {
entry: path.resolve(dir_js, 'entry.js'),
output: {
path: dir_build,
filename: "bundle.js"
},
module: {
loaders: [
{test: /\.css$/, loader: 'style!css'},
{
test: /\.js|jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react'],
compact: false
}
},
]
},
resolve: {
extensions: ['', '.js', '.jsx'],
//alias: {
// echarts: "js/echarts.min.js"
//}
},
plugins: [
// ie 8
new es3ifyPlugin(),
],
externals:{
}
};