-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.ts
71 lines (70 loc) · 1.44 KB
/
webpack.config.ts
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/// <reference types="node" />
/// <reference path="node_modules/typescript/lib/lib.esnext.d.ts" />
import * as fs from 'fs';
import * as Path from 'path';
const sourcePath = Path.join(__dirname, 'src');
const buildPath = Path.join(__dirname, 'dist');
const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin');
export = {
entry: {
app: './app',
},
output: {
path: buildPath,
publicPath: '',
filename: '[name].js',
},
devServer: {
https: false,
overlay: true,
noInfo: false,
contentBase: [sourcePath, buildPath],
port: 8087,
historyApiFallback: true,
hot: true,
inline: true,
disableHostCheck: true,
},
node: {
// workaround for webpack-dev-server issue
// https://github.com/webpack/webpack-dev-server/issues/60#issuecomment-103411179
fs: 'empty',
net: 'empty',
buffer: 'empty',
Buffer: false,
setimmediate: false,
},
target: 'web',
resolve: {
extensions: ['.ts', '.js'],
modules: ['node_modules'],
alias: {
rxjs$: 'rxjs/_esm5/Rx.js',
rxjs: 'rxjs/_esm5'
}
},
module: {
exprContextCritical: false,
rules: [
{
parser: { amd: false }
},
{
test: /\.ts$/,
use: [
{
loader: 'awesome-typescript-loader',
options: {
useTranspileModule: true,
isolatedModules: true,
transpileOnly: true,
}
},
]
},
],
},
plugins: [
new NamedModulesPlugin(),
]
}