mirror of https://github.com/BTCPrivate/copay.git
42 lines
875 B
JavaScript
42 lines
875 B
JavaScript
|
var webpack = require('webpack');
|
||
|
var path = require('path');
|
||
|
|
||
|
module.exports = {
|
||
|
devtool: 'inline-source-map',
|
||
|
|
||
|
resolve: {
|
||
|
extensions: ['.ts', '.js']
|
||
|
},
|
||
|
|
||
|
module: {
|
||
|
rules: [{
|
||
|
test: /\.ts$/,
|
||
|
loaders: [{
|
||
|
loader: 'ts-loader'
|
||
|
}, 'angular2-template-loader']
|
||
|
},
|
||
|
{
|
||
|
test: /\.html$/,
|
||
|
loader: 'html-loader?attrs=false'
|
||
|
},
|
||
|
{
|
||
|
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
|
||
|
loader: 'null-loader'
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
|
||
|
plugins: [
|
||
|
new webpack.ContextReplacementPlugin(
|
||
|
// The (\\|\/) piece accounts for path separators in *nix and Windows
|
||
|
/(ionic-angular)|(angular(\\|\/)core(\\|\/)@angular)/,
|
||
|
root('./src'), // location of your src
|
||
|
{} // a map of your routes
|
||
|
)
|
||
|
]
|
||
|
};
|
||
|
|
||
|
function root(localPath) {
|
||
|
return path.resolve(__dirname, localPath);
|
||
|
}
|