Is possible to remove [chunkhash] in production build using flags or config,
i am using ASP.NET with angular2 and cli but can't use production to build with out manual steps to update scripts referenced in cshtml file to reflect the new chunkhash
Sorry for my bad English and if anyone can help or have an idea to help will be greet to hear from you
I think a better option would be to have the CLI write out a JSON map file of the bundle name to the hashed bundle name.
{
"0.chunk.js": "0.chunk.6586457.js"
....
}
This way any third party tools could consume the generated hashed bundles.
Another option would be for consuming code to do a file lookup in the dist folder and pattern match against the hashed files and generate the map dynamically. This should be trivial in C#.
fixed by using asp.net core tag helpers
<script type="text/javascript" asp-src-include="~/inline*.bundle.js"></script>
<script type="text/javascript" asp-src-include="~/scripts*.bundle.js"></script>
<script type="text/javascript" asp-src-include="~/vendor*.bundle.js"></script>
<script type="text/javascript" asp-src-include="~/main*.bundle.js"></script>
<link asp-href-include="~/styles*.bundle.css" rel="stylesheet">
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._
Most helpful comment
I think a better option would be to have the CLI write out a JSON map file of the bundle name to the hashed bundle name.
This way any third party tools could consume the generated hashed bundles.
Another option would be for consuming code to do a file lookup in the dist folder and pattern match against the hashed files and generate the map dynamically. This should be trivial in C#.