forked from preboot/angularjs-webpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.build.babel.js
More file actions
33 lines (30 loc) · 976 Bytes
/
webpack.build.babel.js
File metadata and controls
33 lines (30 loc) · 976 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 webpack from 'webpack';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import webpackConfig from './webpack.base.js';
webpackConfig.output.publicPath = '/public/';
webpackConfig.output.filename = 'javascripts/[name].[hash].js';
webpackConfig.output.chunkFilename = 'javascripts/[name].[hash].js';
webpackConfig.devtool = 'hidden-source-map';
webpackConfig.bail = true;
webpackConfig.sassLoaderConfig = {
sourceMap: false,
outputStyle: 'compressed'
};
webpackConfig.plugins.push(
new ExtractTextPlugin('stylesheets/[name].[hash].css', {
disable: false
}),
new HtmlWebpackPlugin({
template: './assets/client/index.html',
inject: 'body'
}),
new webpack.NoErrorsPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
output: {
comments: false
}
})
);
export default webpackConfig;