-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
40 lines (35 loc) · 926 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
var path = require("path");
var webpack = require('webpack');
var bundlePath = './build';
module.exports = {
context: __dirname,
entry: {
app: './src/test.js'
},
output: {
path: path.resolve(bundlePath),
filename: "[name].js"
},
plugins: [
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery'
})
],
module: {
loaders: [
{test: /\.css$/, loader: "style-loader!css-loader"},
{test: /\.scss$/, loader: "style-loader!css-loader!sass-loader"},
{test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel', // 'babel-loader' is also a valid name to reference
query: {
presets: ['es2015', 'react']
}
}
]
},
watchOptions: {
poll: true
}
};