Skip to content

Is possible to remove [chunkhash] in production build using flag or config #3711

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
alyahmedaly opened this issue Dec 22, 2016 · 4 comments
Closed

Comments

@alyahmedaly
Copy link

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

@martinmcwhorter
Copy link

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#.

@filipesilva
Copy link
Contributor

Dupe of #2774

@alyahmedaly
Copy link
Author

alyahmedaly commented Jan 4, 2017

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">

@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

3 participants