-
Notifications
You must be signed in to change notification settings - Fork 33
ability to split the vendor and app bundles #4
Comments
I'm curious about this myself, as I think it would potentially speed up build times. There's a nice writeup by the author of browserify on doing common webpack tasks with browserify: https://gist.github.com/substack/68f8d502be42d5cd4942 which might be a good starting point, I just haven't looked into how the app bundle requires the vendor bundle. |
With webpack 2, there's a pretty easy way to do this. We're using something like this on our webpack build for Ionic. entry: {
js: path.resolve(__dirname, 'app/app.ts'),
vendor: [
path.normalize('es6-shim/es6-shim.min'),
'reflect-metadata',
'zone.js/dist/zone',
'ionic-angular'
]
} Then use the CommonChunksPlugin: new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: Infinity,
filename: 'vendor.bundle.js'
}), Outputs a |
Yes I was using this approach with webpack (before switching to browserify) to split the vendor and app bundles. There is another article https://lincolnloop.com/blog/speedy-browserifying-multiple-bundles/ that talks about it on how to do it for browserify. |
I'm curious on your reasons for switching to Browserify. Our team has found Webpack to be a superior tool in nearly every aspect - especially speed and incremental builds. My apologies for the post above. I thought you were looking for a webpack solution. 😄 |
Optimizing for ease of use, low barrier to start, with the idea that if you On Thu, Apr 7, 2016 at 11:53 AM Dave Ackerman [email protected]
|
I was using webpack earlier and though managed to use it successfully for a complex build, I was never happy with the abstraction that it provided and had to do lot of search to find the right syntax and command.
I like the gulp and browserfiy approach however I am missing the generation of two bundles - one that has all vendor scripts (ionic, angular, lodash, rxjs etc) and other that only has my app.
How should I one achieve this using this new gulp based system ?
Regards & thanks
Kapil
The text was updated successfully, but these errors were encountered: