-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
35 lines (34 loc) · 1.02 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
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: {
sample1: './src/sample1/sample1.ts',
sample2: './src/sample2/sample2.ts',
sample3: './src/sample3/sample3.ts',
sample4: './src/sample4/sample4.ts',
sample5: './src/sample5/sample5.ts',
libs: ['rxjs'],
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
publicPath: '/dist/',
},
resolve: {
// Add `.ts` and `.tsx` as a resolvable extension.
extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js'],
},
module: {
loaders: [
// all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
{ test: /\.tsx?$/, loader: 'ts-loader' },
{ test: /\.html$/, loader: 'file-loader', query: { name: '[name].[ext]' } },
]
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: 'libs',
}),
],
devtool: 'eval',
}