Andrea Campanella | 95c02bd | 2017-09-01 16:51:03 +0200 | [diff] [blame^] | 1 | |
| 2 | /* |
| 3 | * Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | |
| 19 | module.exports = { |
| 20 | module: { |
| 21 | preLoaders: [ |
| 22 | { |
| 23 | test: /\.ts$/, |
| 24 | exclude: /node_modules/, |
| 25 | loader: 'tslint' |
| 26 | } |
| 27 | ], |
| 28 | loaders: [ |
| 29 | { |
| 30 | test: /.json$/, |
| 31 | loaders: [ |
| 32 | 'json' |
| 33 | ] |
| 34 | }, |
| 35 | { |
| 36 | test: /\.ts$/, |
| 37 | exclude: /node_modules/, |
| 38 | loaders: [ |
| 39 | 'ng-annotate', |
| 40 | 'ts' |
| 41 | ] |
| 42 | }, |
| 43 | { |
| 44 | test: /.html$/, |
| 45 | loaders: [ |
| 46 | 'html?' + JSON.stringify({ |
| 47 | attrs: ["img:src", "img:ng-src"] |
| 48 | }) |
| 49 | ] |
| 50 | }, |
| 51 | { |
| 52 | test: /\.(css|scss)$/, |
| 53 | loaders: [ |
| 54 | 'style', |
| 55 | 'css', |
| 56 | 'sass', |
| 57 | 'postcss' |
| 58 | ] |
| 59 | }, |
| 60 | { |
| 61 | test: /\.(png|woff|woff2|eot|ttf|svg|jpg|gif|jpeg)$/, |
| 62 | loader: 'url-loader?limit=100000' |
| 63 | } |
| 64 | ] |
| 65 | }, |
| 66 | plugins: [], |
| 67 | debug: true, |
| 68 | devtool: 'source-map', |
| 69 | resolve: { |
| 70 | extensions: [ |
| 71 | '', |
| 72 | '.webpack.js', |
| 73 | '.web.js', |
| 74 | '.js', |
| 75 | '.ts' |
| 76 | ] |
| 77 | }, |
| 78 | ts: { |
| 79 | configFileName: 'tsconfig.json' |
| 80 | }, |
| 81 | tslint: { |
| 82 | configuration: require('../tslint.json') |
| 83 | } |
| 84 | }; |