Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Duplicate code in split bundles #867

Closed
danbucholtz opened this issue Apr 1, 2017 · 4 comments
Closed

Duplicate code in split bundles #867

danbucholtz opened this issue Apr 1, 2017 · 4 comments
Assignees

Comments

@danbucholtz
Copy link
Contributor

Angular CLI repro
https://github.com/danbucholtz/angular-cli-duplicate-modules

Ionic repro
https://github.com/rapropos/ionic-lazy-sandbox

Basically, with a SharedModule imported by multiple NgModules, I see the same code in multiple chunks. This is not how Webpack is supposed to work.

Thanks,
Dan

@rapropos
Copy link

rapropos commented Apr 3, 2017

Forum poster rlouie found angular-cli #2771, which looks highly relevant.

@danbucholtz
Copy link
Contributor Author

@rapropos,

Sorry, I forgot to follow up. I think this is working as designed right now. I'm not super pleased with that design but it is what it is for now. I reached out to angular-cli team and the webpack team to get the info.

Thanks,
Dan

@rapropos
Copy link

rapropos commented Apr 4, 2017

Thanks for the update. May I just plead that if this doesn't get resolved, don't make lazy page loading mandatory? Going back to putting everything in a single app module is better for some situations. I accept that you're going to have to do what you have to do with generator boilerplate code, but just please let people continue to pass constructors to navigation controllers and bypass the deep linking magic.

@danbucholtz
Copy link
Contributor Author

Lazy loading was never and will never be mandatory. I agree with you. We are going to ship Ionic 3 not talk about lazy loading yet because we need to go back to the drawing board a bit. The tooling (aka Webpack and Uglify) is not working the way we or the angular team expected so we need to think our recommendations through a bit more.

Thanks,
Dan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants