webpack.common.js

33 lines | 839 B Blame History Raw Download
const path = require('path');
module.exports = {
    entry: {
        'main': path.resolve(__dirname, 'App', 'boot.ts')
    },
    resolve: {
        extensions: [".ts", ".js", ".json"]
    },
    module: {
        rules: [
            {
                //ts to js
                test: /\.ts$/,
                use: 'ts-loader'
            },
            {
                //html to js
                test: /\.html$/,
                use: 'html-loader'
            },
            {
                //css to js to inline style append
                test: /\.css$/,
                use: ['style-loader', 'css-loader']
            },
            {
                //less to css to js to inline style append
                test: /\.less$/,
                use: ['style-loader', 'css-loader', 'less-loader']
            }
        ]
    }
};