-
Notifications
You must be signed in to change notification settings - Fork 12k
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
[Feature] Get bundle filename by bundle name, lazy styles / scripts #8831
Comments
Another solution could be to add a flag to generate a assets.json file that only contains the asset file names. I tried doing this with the |
@Epenance I wouldn't limit this to style bundles but script bundles as well. |
@deebloo I agree. |
The script bundles currently don't have the hash, but the styles do unfortunately. This is a bug but we haven't found a good way to fix it. |
@filipesilva I see, I personally dont think the hash itself is a bad thing, as long as there is a way to know it, its good for invalidating caches :) |
I also discovered this need while trying to implementing lazy loaded themes like https://material.angular.io/ meanwhile an implementation of when "prefix": "app",
"styles": [
{ "input": "scss/red.scss", "output": "red", "lazy": true , "hash": false},
{ "input": "scss/blue.scss", "output": "blue", "lazy": true , "hash": false},
{ "input": "scss/green.scss", "output": "green", "lazy": true , "hash": false},
{ "input": "scss/yellow.scss", "output": "yellow", "lazy": true , "hash": false}
], we need hashing for rest of the files for cache busting. a potential temp solution is enabling |
Encountered the same problem when trying to lazy load assets manually too, without sacrificing bundle hashes. Even just having a manifest/assets json file, output within /dist, that just included "assetsByChunkName" from stats.json would go a long way. |
We've since remove hashes from the lazy bundles so I think this is solved. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Desired functionality.
In #3401 the functionality to add new style bundles and set them to lazy load making them not automatically included in the app was added, and it works great! However it is currently impossible to predict the hash of the files, forcing you to disable output-hashing if you want to be able to load it yourself into the application.
It would be great to have a function of sorts where we could fetch the file name of the bundle by supplying the bundle name.
angular-cli.json example:
It would be great to have something in the way of:
Or something similar.
The text was updated successfully, but these errors were encountered: