Created
February 5, 2016 18:41
-
-
Save aporat/893b97a700bd2cd6aead to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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