Skip to content

Rename lazy-loaded bundles with the name of their module #5582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BenjaminSchubert opened this issue Mar 23, 2017 · 4 comments
Closed

Rename lazy-loaded bundles with the name of their module #5582

BenjaminSchubert opened this issue Mar 23, 2017 · 4 comments

Comments

@BenjaminSchubert
Copy link

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request

Versions.

@angular/cli: 1.0.0-rc.4
node: 6.10.0
os: linux x64
@angular/common: 4.0.0-rc.6
@angular/compiler: 4.0.0-rc.6
@angular/core: 4.0.0-rc.6
@angular/forms: 4.0.0-rc.6
@angular/http: 4.0.0-rc.6
@angular/platform-browser: 4.0.0-rc.6
@angular/platform-browser-dynamic: 4.0.0-rc.6
@angular/router: 4.0.0-rc.6
@angular/cli: 1.0.0-rc.4
@angular/compiler-cli: 4.0.0-rc.6

Desired functionality.

When using lazy loaded modules, they get extracted by Webpack to separate bundles, which is great.

However, the names of the bundles are really obscure : [0-9]+\.$hash\.js which is not practical when trying to debug things in one of them.

I would really like something like $name_of_the_module.$hash.js instead, which would allow us to know directly which bundle is this. I don't know if webpack would be able of this though.

Thanks a lot !

@intellix
Copy link
Contributor

Dupe of: #5171

@PEsteves8
Copy link

Yup, there are a few issues asking for this. I also tried doing ng eject and messing directly with the webpack config. However, the chunk [name] seems to end up being the same as the [id] (all those numbers). So I'm not really sure on how to get named chunks that way either. (or separating them into different directories, but I don't think webpack supports that)

@filipesilva
Copy link
Contributor

Closing as dupe, thans @intellix !

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants