Manuel Friedli
77a79bf588
That serves as a proof-of-concept and as a template for future tests. It's a start!
52 lines
1.4 KiB
JavaScript
52 lines
1.4 KiB
JavaScript
var webpack = require('webpack');
|
|
var helpers = require('./helpers');
|
|
|
|
module.exports = {
|
|
devtool: 'inline-source-map',
|
|
|
|
resolve: {
|
|
extensions: ['.ts', '.js']
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts$/,
|
|
loaders: [
|
|
{
|
|
loader: 'awesome-typescript-loader',
|
|
options: {configFileName: helpers.root('src', 'tsconfig.json')}
|
|
}, 'angular2-template-loader'
|
|
]
|
|
},
|
|
{
|
|
test: /\.html$/,
|
|
loader: 'html-loader'
|
|
|
|
},
|
|
{
|
|
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
|
|
loader: 'null-loader'
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
exclude: helpers.root('src', 'app'),
|
|
loader: 'null-loader'
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
include: helpers.root('src', 'app'),
|
|
loader: 'raw-loader'
|
|
}
|
|
]
|
|
},
|
|
|
|
plugins: [
|
|
new webpack.ContextReplacementPlugin(
|
|
// The (\\|\/) piece accounts for path separators in *nix and Windows
|
|
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
|
|
helpers.root('./src'), // location of your src
|
|
{} // a map of your routes
|
|
)
|
|
]
|
|
};
|