-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dist.config.js
42 lines (39 loc) · 1.32 KB
/
webpack.dist.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
const path = require("path");
const webpack = require("webpack");
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const GhPagesWebpackPlugin = require('gh-pages-webpack-plugin');
const WebpackBuildNotifierPlugin = require("webpack-build-notifier");
const BitBarWebpackProgressPlugin = require("bitbar-webpack-progress-plugin");
const commonConf = require('./webpack.common.config.js');
commonConf.watch = false
commonConf.output.path = path.join(__dirname + '/dist')
module.exports = [ Object.assign({}, commonConf, {
name: 'ui',
devtool: 'source-map',
entry: {
ui: './app/index.ts',
worker: './app/worker-index.ts'
},
plugins: [
new HtmlWebpackPlugin({
chunks: ['ui'],
filename: 'index.html',
favicon: 'app/favicon.ico',
template: 'app/index.pug'
}),
new ExtractTextPlugin('styles.css'),
new webpack.optimize.CommonsChunkPlugin({
name: "common",
filename: "common-bundle.js"
}),
// new webpack.optimize.UglifyJsPlugin(), -p adds this
new webpack.DefinePlugin({'process.env.NODE_ENV': '"production"'}),
new webpack.NoEmitOnErrorsPlugin(),
new BitBarWebpackProgressPlugin(),
new WebpackBuildNotifierPlugin({
title: "Fibra UI Webpack Distribution Build"
})
]
})
];