blob: c39b1c41dd4167df2ddc36bb5f55746b51feb0bc [file] [log] [blame]
Matteo Scandolod819c922016-12-02 14:06:14 -08001const webpack = require('webpack');
2const conf = require('./gulp.conf');
3module.exports = {
4 module: {
5 preLoaders: [
6 {
7 test: /\.ts$/,
8 exclude: /node_modules/,
9 loader: 'tslint'
10 }
11 ],
12
13 loaders: [
14 {
15 test: /.json$/,
16 loaders: [
17 'json'
18 ]
19 },
20 {
21 test: /\.ts$/,
22 exclude: /node_modules/,
23 loaders: [
24 'ts'
25 ]
26 },
27 {
28 test: /.html$/,
29 loaders: [
30 'html'
31 ]
32 }
33 ]
34 },
35 plugins: [
36 new webpack.ContextReplacementPlugin(
37 /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
38 conf.paths.src
39 )
40 ],
41 debug: true,
42 devtool: 'source-map',
43 resolve: {
44 extensions: [
45 '',
46 '.webpack.js',
47 '.web.js',
48 '.js',
49 '.ts'
50 ]
51 },
52 ts: {
53 configFileName: 'tsconfig.json'
54 },
55 tslint: {
56 configuration: require('../tslint.json')
57 }
58};