-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
40 lines (40 loc) · 1012 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
/**
* Created by Jinxin on 2017/11/16.
*/
const path = require('path');
const webpack = require("webpack");
const OpenBrowserPlugin = require("open-browser-webpack-plugin");
config = {
entry: path.resolve(__dirname, "./app/main.jsx"),
output: {
path: path.resolve(__dirname, 'build'),
filename: "bundle.js"
},
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: "babel-loader",
query: {
presets: ["react", "es2015"]
}
}, {
exclude: /node_modules/,
loader: ["eslint-loader"]
}]
},
resolve: {
extensions: ['.js', '.jsx']
},
plugins: [
new OpenBrowserPlugin({ url: "http://localhost:8080" }),
new webpack.LoaderOptionsPlugin({
options: {
eslint: {
configFile: "./.eslintrc"
}
}
})
]
}
module.exports = config;