forked from scottpurdy/strut2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.common.config.js
35 lines (32 loc) · 988 Bytes
/
webpack.common.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
module.exports = {
module: {
preLoaders: [{
test: '\\.js$',
exclude: 'node_modules',
loader: 'jshint'
}],
loaders: [{
test: /\.css$/,
loader: 'style!css'
}, {
test: /\.gif$/,
loader: 'url-loader?limit=10000&mimetype=image/gif'
}, {
test: /\.jpg$/,
loader: 'url-loader?limit=10000&mimetype=image/jpg'
}, {
test: /\.png$/,
loader: 'url-loader?limit=10000&mimetype=image/png'
},
{ test: /\.js(x?)$/, exclude: /node_modules/, loader: 'babel-loader?optional=runtime'},
{ test: /\.woff$/, loader: "url-loader?limit=10000&minetype=application/font-woff" },
{ test: /\.ttf$/, loader: "file-loader" },
{ test: /\.eot$/, loader: "file-loader" },
{ test: /\.svg$/, loader: "file-loader" }]
},
resolve: {
root: __dirname + '/src',
modulesDirectories: ['scripts', 'styles', 'node_modules']
},
entry: './src/scripts/components/<%= pkg.mainInput %>.jsx'
};