-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
executable file
·41 lines (40 loc) · 997 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
var path = require('path');
const webpack = require('webpack');
module.exports = {
entry: "./app/app.js",
output: {
filename: "./public/js/bundle.js",
sourceMapFilename: "./public/js/bundle.map"
},
devtool: 'eval',
module: {
preLoaders: [{
test: /\.json$/,
exclude: /(node_modules)/,
loader: 'json'
}],
loaders: [
{
loader: 'babel',
test: /\.jsx?$/,
exclude: /(node_modules)/,
query: {
presets: ['react', 'es2015', 'stage-2']
}
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader'],
include: path.join(__dirname, 'public', 'css')
},
]
},
resolve: {
root: path.resolve('./app'),
extenstions: ['', '.js']
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
]
}