-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.build.js
More file actions
41 lines (38 loc) · 1.07 KB
/
webpack.build.js
File metadata and controls
41 lines (38 loc) · 1.07 KB
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
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpackConfig = require('./webpack.base.js');
webpackConfig.output.publicPath = '/public/';
webpackConfig.output.filename = 'javascripts/[name].js';
webpackConfig.output.chunkFilename = 'javascripts/[name].js';
webpackConfig.devtool = 'hidden-source-map';
webpackConfig.bail = true;
webpackConfig.sassLoaderConfig = {
sourceMap: false,
outputStyle: 'compressed'
};
webpackConfig.plugins.push(
new ExtractTextPlugin('stylesheets/[name].css', {
disable: false
}),
new HtmlWebpackPlugin({
template: './assets/client/public/index.html',
favicon: 'assets/client/public/favicon.ico',
inject: 'body',
hash: true,
minify: {
collapseWhitespace: true
}
}),
new webpack.NoErrorsPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
output: {
comments: false
}
}),
new webpack.DefinePlugin({
DEBUG: false
})
);
module.exports = webpackConfig;