forked from Dean177/lunch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.prod.js
More file actions
33 lines (31 loc) · 852 Bytes
/
Copy pathwebpack.config.prod.js
File metadata and controls
33 lines (31 loc) · 852 Bytes
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
import path from 'path';
import webpack, { optimize, DefinePlugin} from 'webpack';
const config = {
devtool: 'source-map',
entry: ['./src/client/index'],
output: {
path: path.join(__dirname, 'out/client'),
filename: 'bundle.js',
publicPath: '/assets/'
},
plugins: [
new optimize.OccurenceOrderPlugin(),
new DefinePlugin({ 'process.env': { 'NODE_ENV': 'production' } }),
new optimize.UglifyJsPlugin({ compressor: { warnings: false } })
],
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel?stage=0'],
include: [
path.join(__dirname, 'src', 'client'),
path.join(__dirname, 'src', 'shared')
]
},
{ test: /\.scss$/, loader: "style!css!sass" },
{ test: /\.(png|gif|jpg)$/, loader: "file-loader" }
]
}
};
export default config;