only create single CommonJS bundle

This commit is contained in:
Tim Lancina
2015-12-10 10:38:40 -06:00
parent d464d5cb1c
commit 723a4f2847
3 changed files with 23 additions and 39 deletions

View File

@ -1,19 +0,0 @@
module.exports = {
entry: [
"zone.js", // required for Angular change detection
"reflect-metadata", // required for Angular DI
"es6-shim/es6-shim.min.js",
"web-animations.min",
"./dist/ionic.js"
],
output: {
path: 'dist/bundles',
filename: 'ionic.bundle.js',
libraryTarget: 'umd'
},
resolve: {
alias: {
'web-animations.min': './dist/js/web-animations.min'
}
}
};

View File

@ -1,16 +1,32 @@
module.exports = {
entry: [
"es6-shim/es6-shim.min.js",
"./dist/ionic.js"
],
output: {
path: 'dist/bundles',
filename: 'ionic.js',
libraryTarget: 'umd'
libraryTarget: 'commonjs2'
},
externals: [
'angular2/angular2',
'angular2/router',
'angular2/http'
{
'angular2/core': {
commonjs2: ['angular2', 'core']
},
'angular2/common': {
commonjs2: ['angular2', 'common']
},
'angular2/router' : {
commonjs2: ['angular2', 'router']
},
'angular2/http': {
commonjs2: ['angular2', 'http']
},
'angular2/platform/browser': {
commonjs2: ['angular2', 'platform', 'browser']
},
'angular2/instrumentation': {
commonjs2: ['angular2', 'instrumentation']
},
}
]
};