-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[release/10.0] Fix ScriptTagHelper regression by checking for existing content before processing importmaps #63631
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
Conversation
…sp-importmap Co-authored-by: MackinnonBuck <[email protected]>
…tent Co-authored-by: javiercn <[email protected]>
|
several customers reported this, upgrade impediment from .NET 8, limited risk. approved |
|
@wtgodbe, the build is failing because this technically changes the public API of |
Was the original API added in 10? If so, is there a way to just fix the api txt files so this doesn't trigger? Separate, but I'm assuming we are going to (if we haven't already) add this to the breaking changes list for RC2? |
The removed override has been shipping since before .NET 10.
I'm pretty sure this isn't a breaking change (even though the API is changing), as the removed override is still defined on the base type. Maybe I'm mistaken about this not being a breaking change, but this suggests it's allowed. |
|
I find it odd that this isn't a breaking change as things stop working. |
Script tag helper ask mode PR content
Backport of #63155 to release/10.0
/cc @MackinnonBuck @copilot
Fix ScriptTagHelper regression by checking for existing content before processing importmaps
Preserves developer-provided content in the
<script>tag helper when itstypeis"importmap".Description
In .NET 9, we updated the
<script>tag helper to automatically include an import map for fingerprinted JavaScript assets when itstypeattribute was set to"importmap".However, if the app had been specifying import map content explicitly, then that content would get overridden by the updated tag helper logic.
This fix changes
ScriptTagHelperto preserve the any developer-specified import map content.Fixes #58973
Customer Impact
This bug impacts customers upgrading to .NET 9 or 10 from .NET 8. The linked issue has notable community engagement which indicates that many customers are affected by this break.
There is a workaround, which is to use the following syntax to bypass the tag helper:
<!script type="importmap">...</!script>Regression?
Regressed in .NET 9
Risk
The fix is straightforward and has been validated via both automated and manual testing.
Verification
Packaging changes reviewed?