forked from CleverCloud/json2caseclass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
55 lines (45 loc) · 1.22 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
50
51
52
53
54
55
'use strict';
var webpack = require('webpack');
var path = require('path');
var HasteResolverPlugin = require('haste-resolver-webpack-plugin');
var NODE_ENV = process.env.NODE_ENV;
module.exports = {
entry: {
mainpage: './index.js'
},
output: {
path: __dirname + '/assets',
publicPath: "/assets/",
filename: '[name]-bundle.js'
},
plugins: [
new webpack.NoErrorsPlugin(),
new HasteResolverPlugin({
platform: 'web',
nodeModules: ['react-web']
}),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('development')
}
})
],
module: {
loaders: [
{
test: /\.json$/,
loader: "json-loader"
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{
test: /\.(png|jpg|svg)$/,
loaders: [
'url-loader?limit=8192',
'image-webpack?optimizationLevel=7&progressive=true']
} // inline base64 URLs for <=8k images, direct URLs for the rest,
]
}
};