Skip to content
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

[Blazor] Remove blazor script check #8744

Merged
merged 2 commits into from
Jun 9, 2023

Conversation

javiercn
Copy link
Member

Summary of the changes

  • Removes the check that we have to produce an error when you include a script tag inside a Razor file.
  • We used to have this check to preclude people accidentally adding script tags to their components, since in the context of interactive rendering it does not do what they expect.
  • As we are rendering components statically in .NET 8.0, this warning/errors creates more problems than it solves, and there is no reason for us to keep it around, and instead, we will let the customers do as they see fit.

Fixes:
#8743

@itsmuntadhar
Copy link

also helps if you have to have a specific script for a specific page/component and don't want to load it everywhere, i.e. putting it in index.html.

@javiercn javiercn marked this pull request as ready for review June 7, 2023 10:17
@javiercn javiercn requested a review from a team as a code owner June 7, 2023 10:17
@javiercn
Copy link
Member Author

javiercn commented Jun 7, 2023

/AzurePipelines run razor-tooling-ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@javiercn
Copy link
Member Author

javiercn commented Jun 7, 2023

@chsienki can you take a look?

@javiercn javiercn requested a review from chsienki June 7, 2023 17:52
Copy link
Contributor

@chsienki chsienki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @333fred or @jjonescz for a second review.

@davidwengier
Copy link
Contributor

For my interest/knowledge, should this be gated by a razor version or TFM check or something? I worry that someone will open a project in VS that targets an old SDK, not get warnings about their script tags, but then when they do a command line/CI build they will.

Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too worried about the warning difference, but I'll ping @jaredpar for his thoughts/awareness as well.

@javiercn
Copy link
Member Author

javiercn commented Jun 9, 2023

Thanks for the review folks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants