aboutsummaryrefslogtreecommitdiffstats
path: root/webpack.build.config.js
blob: 9c74402b8adc941b418c1a6d79e1f55c23b8a2f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
var path = require('path');

var webpackConfig = {

    devtool: 'source-map',

    entry: {},

    output: {
        publicPath: ''
    },

    plugins: [
    ],

    module: {
        rules: [
            // .ts files for TypeScript
            {
                test: /.ts$/,
                use: [
                    'awesome-typescript-loader',
                    'angular2-template-loader',
                    'angular2-router-loader'
                ]
            },
            {
                test: /\.html$/,
                loader: 'html-loader'
            },
            {
                test: /\.scss$/,
                use: ['style-loader', 'css-loader', 'sass-loader'],
                include: path.resolve(__dirname, '../')
            },
            {
                test: /\.json$/,
                loader: 'json',
                include: path.resolve(__dirname, '../')

            },
            {
                test: /\.svg$/,
                use: 'svg-sprite-loader',
                options: {
                    extract: true,

                }
            }
        ]
    },

    resolve: {
        extensions: ['.ts', '.js', '.json'],
        modules: [path.resolve(__dirname, 'node_modules')],
        alias: {
            root: path.resolve(__dirname),
            app: path.resolve(__dirname, 'src')
        }
    }
};

module.exports = webpackConfig;