Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 1 | module.exports = { |
| 2 | module: { |
| 3 | preLoaders: [ |
| 4 | { |
| 5 | test: /\.ts$/, |
| 6 | exclude: /node_modules/, |
| 7 | loader: 'tslint' |
| 8 | } |
| 9 | ], |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 10 | loaders: [ |
| 11 | { |
| 12 | test: /.json$/, |
| 13 | loaders: [ |
| 14 | 'json' |
| 15 | ] |
| 16 | }, |
| 17 | { |
| 18 | test: /\.ts$/, |
| 19 | exclude: /node_modules/, |
| 20 | loaders: [ |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 21 | 'ng-annotate', |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 22 | 'ts' |
| 23 | ] |
| 24 | }, |
| 25 | { |
| 26 | test: /.html$/, |
| 27 | loaders: [ |
Matteo Scandolo | d62ea79 | 2016-12-22 14:02:28 -0800 | [diff] [blame] | 28 | 'html?' + JSON.stringify({ |
| 29 | attrs: ["img:src", "img:ng-src"] |
| 30 | }) |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 31 | ] |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 32 | }, |
| 33 | { |
| 34 | test: /\.(css|scss)$/, |
| 35 | loaders: [ |
| 36 | 'style', |
| 37 | 'css', |
| 38 | 'sass', |
| 39 | 'postcss' |
| 40 | ] |
Matteo Scandolo | 266907e | 2016-12-20 13:41:42 -0800 | [diff] [blame] | 41 | }, |
| 42 | { |
| 43 | test: /\.(png|woff|woff2|eot|ttf|svg|jpg|gif|jpeg)$/, |
| 44 | loader: 'url-loader?limit=100000' |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 45 | } |
| 46 | ] |
| 47 | }, |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 48 | plugins: [], |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 49 | debug: true, |
| 50 | devtool: 'source-map', |
| 51 | resolve: { |
| 52 | extensions: [ |
| 53 | '', |
| 54 | '.webpack.js', |
| 55 | '.web.js', |
| 56 | '.js', |
| 57 | '.ts' |
| 58 | ] |
| 59 | }, |
| 60 | ts: { |
| 61 | configFileName: 'tsconfig.json' |
| 62 | }, |
| 63 | tslint: { |
| 64 | configuration: require('../tslint.json') |
| 65 | } |
| 66 | }; |