Skip to content

Instantly share code, notes, and snippets.

@aporat
Created February 5, 2016 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aporat/893b97a700bd2cd6aead to your computer and use it in GitHub Desktop.
Save aporat/893b97a700bd2cd6aead to your computer and use it in GitHub Desktop.
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
path.normalize('es6-shim/es6-shim.min'),
'reflect-metadata',
'web-animations.min',
path.normalize('zone.js/dist/zone-microtask'),
path.resolve('app/app')
],
output: {
path: path.resolve('www/build/js'),
filename: 'app.bundle.js',
pathinfo: false // show module paths in the bundle, handy for debugging
},
module: {
loaders: [
{
test: /\.ts$/,
loader: 'awesome-typescript',
query: {
'doTypeCheck': false
},
include: path.resolve('app'),
exclude: /node_modules/
},
{
test: /\.js$/,
include: path.resolve('node_modules/angular2'),
loader: 'strip-sourcemap'
}
],
noParse: [
/es6-shim/,
/reflect-metadata/,
/web-animations/,
/zone\.js(\/|\\)dist(\/|\\)zone-microtask/
]
},
resolve: {
alias: {
'web-animations.min': path.normalize('ionic-framework/js/web-animations.min'),
'CryptoJS': path.normalize('crypto-js/crypto-js')
},
extensions: ["", ".js", ".ts"]
},
plugins: [
/*new webpack.optimize.UglifyJsPlugin({
'screw-ie8': true,
'comments': false,
compress: {
warnings: false,
}
}),*/
new webpack.ProvidePlugin({
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
}),
new webpack.ProvidePlugin({
CryptoJS: "CryptoJS"
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment