blob: 04f9e4cb0941e8b441a6e96af378defb2597e02f [file] [log] [blame]
Max Chu3ca3e202017-09-14 10:33:09 -07001
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
19module.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'
Max Chuc2b32492017-11-06 13:49:32 -080076 ],
77 alias: {
78 "ngprogress": path.resolve(__dirname, '../node_modules/ngprogress/build/ngProgress.js')
79 }
Max Chu3ca3e202017-09-14 10:33:09 -070080 },
81 ts: {
82 configFileName: 'tsconfig.json'
83 },
84 tslint: {
85 configuration: require('../tslint.json')
86 }
87};