mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
bundle gulp task
Use webpack to create two UMD bundles - one of just ionic that expects Angular2 to be an external module, the other that includes zone.js, reflect-metadata, and angular2 as well.
This commit is contained in:
19
scripts/npm/bundle.webpack.config.js
Normal file
19
scripts/npm/bundle.webpack.config.js
Normal file
@ -0,0 +1,19 @@
|
||||
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'
|
||||
}
|
||||
}
|
||||
};
|
16
scripts/npm/ionic.webpack.config.js
Normal file
16
scripts/npm/ionic.webpack.config.js
Normal file
@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
entry: [
|
||||
"es6-shim/es6-shim.min.js",
|
||||
"./dist/ionic.js"
|
||||
],
|
||||
output: {
|
||||
path: 'dist/bundles',
|
||||
filename: 'ionic.js',
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
externals: [
|
||||
'angular2/angular2',
|
||||
'angular2/router',
|
||||
'angular2/http'
|
||||
]
|
||||
};
|
Reference in New Issue
Block a user