-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack-client.config.js
More file actions
37 lines (34 loc) · 922 Bytes
/
webpack-client.config.js
File metadata and controls
37 lines (34 loc) · 922 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
34
35
36
37
const path = require('path');
const loaders = require('./src/webpack/loaders');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
module.exports = {
entry: {
client: ['./src/main.ts']
},
output: {
filename: 'app.js',
path: path.resolve(path.join(__dirname, 'dist')),
publicPath: '/'
},
devtool: 'source-map',
resolve: {
extensions: ['.ts', '.js', '.json']
},
externals: ['ng2-file-drop'],
plugins: [
new HtmlWebpackPlugin({
template: './src/index.html',
inject: 'body'
}),
new webpack.ContextReplacementPlugin(
// The (\\|\/) piece accounts for path separators for Windows and MacOS
/(.+)?angular(\\|\/)core(.+)?/,
path.join(__dirname, 'src'), // location of your src
{} // a map of your routes
),
],
module: {
rules: [loaders.tsjit, loaders.html, loaders.css]
}
};