-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
44 lines (43 loc) · 1.28 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
'use strict';
var path = require("path");
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
polyfills: './app/polyfills.ts',
vendor: './app/vendor.ts',
main: './app/main.ts'
/*polyfills: [
'./node_modules/core-js/client/shim.min.js',
'./node_modules/zone.js/dist/zone.js',
'./node_modules/reflect-metadata/Reflect.js',
'./node_modules/systemjs/dist/system.src.js'
]*/
},
output: {
path: path.join(__dirname, './dist/assets'),
publicPath: '/assets/',
filename: '[name].js'
},
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.tsx', '.js']
},
module: {
loaders: [
{ test: /\.ts[x]?$/, loader: 'ts-loader' }
]
},
plugins: [
/*new CommonsChunkPlugin({
name: ['vendor', 'polyfills']
}),*/
new CopyWebpackPlugin([
{ from: './index.html', to: path.join(__dirname, 'dist') },
{ from: './assets/**/*', to: path.join(__dirname, 'dist') },
{ from: './app/template/**/*', to: path.join(__dirname, 'dist') }
])
],
devServer: {
contentBase: "./dist",
historyApiFallback: true
}
}