-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
56 lines (56 loc) · 1.67 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
56
const path = require("path");
const webpack = require("webpack");
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const WebpackBuildNotifierPlugin = require("webpack-build-notifier");
const BitBarWebpackProgressPlugin = require("bitbar-webpack-progress-plugin");
const commonConf = require('./webpack.common.config.js');
commonConf.output.path = path.join(__dirname + '/dist-dev')
commonConf.module.rules[0].use.unshift({
loader: 'angular-hot-loader',
options: {
log: false,
rootElement: 'html'
}
})
module.exports = [ Object.assign({}, commonConf, {
name: 'ui',
entry: {
ui: './app/index.ts',
worker: './app/worker-index.ts',
'webpack-dev-server-client': 'webpack-dev-server/client'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(),
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 BitBarWebpackProgressPlugin(),
new WebpackBuildNotifierPlugin({
title: "Fibra UI Webpack Build"
})
]
})/*, Object.assign({
name: 'worker',
entry: {
worker: './app/worker-index.ts',
'webpack-dev-server-client': 'webpack-dev-server/client'
},
target: 'webworker',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(),
new WebpackBuildNotifierPlugin({
title: "Fibra WebWorker Webpack Build"
})
]
}, commonConf)*/];