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

fix(ssr): prevent rendering duplicate css references #11829

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

katarzyna-stachura-orba

There is a chance that the same css file is included in initial and async array, causing a
element pointing to the same stylesheet to be included multiple times. This fix ensures that cannot
happen. Since multiple build systems exist, this defensive approach avoids any issues with how files
are generated regardless of which one is being used by a given project.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

Other information:

There is a chance that the same css file is included in initial and async array, causing a <link>
element pointing to the same stylesheet to be included multiple times. This fix ensures that cannot
happen. Since multiple build systems exist, this defensive approach avoids any issues with how files
are generated regardless of which one is being used by a given project.
@posva
Copy link
Member

posva commented Dec 17, 2020

So you have a boiled down repro?

@katarzyna-stachura-orba
Copy link
Author

@posva I don't have a reproduction at the moment, but considering that this will be affected by whatever build system is used, there might be countless reproductions.

@posva
Copy link
Member

posva commented Dec 17, 2020

Please read https://new-issue.vuejs.org/?repo=vuejs/vue#why-repro and provide a reproduction

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

Successfully merging this pull request may close these issues.

2 participants