blob: 472064992f373f0eca1872ffed5eb423bd6c4546 [file] [log] [blame]
Matteo Scandolod819c922016-12-02 14:06:14 -08001module.exports = {
2 module: {
3 preLoaders: [
4 {
5 test: /\.ts$/,
6 exclude: /node_modules/,
7 loader: 'tslint'
8 }
9 ],
Matteo Scandolod819c922016-12-02 14:06:14 -080010 loaders: [
11 {
12 test: /.json$/,
13 loaders: [
14 'json'
15 ]
16 },
17 {
18 test: /\.ts$/,
19 exclude: /node_modules/,
20 loaders: [
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080021 'ng-annotate',
Matteo Scandolod819c922016-12-02 14:06:14 -080022 'ts'
23 ]
24 },
25 {
26 test: /.html$/,
27 loaders: [
Matteo Scandolod62ea792016-12-22 14:02:28 -080028 'html?' + JSON.stringify({
29 attrs: ["img:src", "img:ng-src"]
30 })
Matteo Scandolod819c922016-12-02 14:06:14 -080031 ]
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080032 },
33 {
34 test: /\.(css|scss)$/,
35 loaders: [
36 'style',
37 'css',
38 'sass',
39 'postcss'
40 ]
Matteo Scandolo266907e2016-12-20 13:41:42 -080041 },
42 {
43 test: /\.(png|woff|woff2|eot|ttf|svg|jpg|gif|jpeg)$/,
44 loader: 'url-loader?limit=100000'
Matteo Scandolod819c922016-12-02 14:06:14 -080045 }
Matteo Scandolo70377e52017-04-10 16:41:28 -070046 ],
47 postLoaders : [
48 {
49 test: /\.ts$/,
50 exclude: /(node_modules|tests|(.spec\.ts))/,
51 loader: 'istanbul-instrumenter' // used to to get the code coverage for TypeScript
52 }
Matteo Scandolod819c922016-12-02 14:06:14 -080053 ]
54 },
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080055 plugins: [],
Matteo Scandolod819c922016-12-02 14:06:14 -080056 debug: true,
Matteo Scandolo70377e52017-04-10 16:41:28 -070057 devtool: false,
Matteo Scandolod819c922016-12-02 14:06:14 -080058 resolve: {
59 extensions: [
60 '',
61 '.webpack.js',
62 '.web.js',
63 '.js',
64 '.ts'
65 ]
66 },
67 ts: {
Matteo Scandolo70377e52017-04-10 16:41:28 -070068 configFileName: 'tsconfig.test.json'
Matteo Scandolod819c922016-12-02 14:06:14 -080069 },
70 tslint: {
71 configuration: require('../tslint.json')
72 }
73};