-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
49 lines (46 loc) · 1.08 KB
/
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
47
48
49
var webpack = require("webpack");
module.exports = {
context: __dirname,
entry: {
jsx: "./src/index.jsx",
css: "./src/main.css",
html: "./src/index.html",
},
output: {
path: __dirname + "/static",
filename: "bundle.js",
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
minimize: true,
compress: true,
output: {comments: false}
})
],
module: {
preLoaders: [
//Eslint loader
{ test: /\.jsx?$/, exclude: /node_modules/, loader: "eslint-loader"},
],
loaders: [
{ test: /\.html$/, loader: "file?name=[name].[ext]" },
{ test: /\.css$/, loader: "file?name=[name].[ext]" },
{ test: /\.jsx?$/, exclude: /node_modules/, loaders: ["react-hot","babel-loader"]},
{
test: /\.json?$/,
loader: 'json-loader'
},
{
test: /\.css$/,
loader: 'style-loader!css-loader',
include: /flexboxgrid/
}
],
},
resolve: {
extensions: ['', '.js', '.jsx']
},
eslint: {
configFile: './.eslintrc'
},
};