-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
47 lines (44 loc) · 1.27 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
var webpack = require('webpack');
var bower_dir = __dirname + '/bower_components';
var config = {
addVendor: function (name, path) {
this.resolve.alias[name] = path;
this.module.noParse.push(new RegExp(path));
},
entry: {
app: ['./app/main.js'],
},
output: {
path: './build',
filename: 'bundle.js'
},
resolve: { alias: {} },
module: {
noParse: [],
preLoaders: [
{
test: /\.jsx?$/, // include .js files
exclude: [/node_modules/, /bower_components/], // exclude any and all files in the node_modules folder
loader: "jsxhint-loader"
}
],
loaders: [
{ test: /\.jsx?$/, loader: 'jsx-loader' },
{ test: /\.jsx?$/, exclude: [/node_modules/, /bower_components/], loader: '6to5-loader?experimental=true'},
]
},
plugins: [
new webpack.ProvidePlugin({
to5Runtime: "imports?global=>{}!exports-loader?global.to5Runtime!6to5/runtime"
})
],
jshint: {
"esnext": true,
"undef": true,
"unused": true,
"browser": true,
"devel": true
}
};
config.addVendor('react', bower_dir + '/react/react.min.js');
module.exports = config;