Skip to content

Do not add style as body link if it already exists #307

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

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

kurtinge
Copy link
Contributor

@kurtinge kurtinge commented Jan 8, 2021

When a stylesheet link already exists in the head and preload is supported the stylesheet is added twice.

This is also mentioned in #300 (comment)

This PR prevent the link from being added to the body if it already is loaded.

@t1mwillis
Copy link

@ScriptedAlchemy can we get this merged in and released?

Lighthouse penalizes this fairly heavily:

Screen Shot 2021-01-20 at 4 13 13 PM

@SuperOleg39
Copy link

@ScriptedAlchemy, big request, merge and publish the fix, if you will have at least a little time

@shinelp100
Copy link

ooh man thx!

@iPrytz
Copy link

iPrytz commented Sep 22, 2021

I have tested this and it is working well. The problem I had was because I hadn't set the publicPath in for the build, but now it works!

@luizotcarvalho
Copy link

luizotcarvalho commented Sep 12, 2023

I can confirm that this PR fix the problem, but at this point I don't expect to be merged any time soon, my solution was to use patch-package to apply the fix direct to the node_modules/extract-css-chunks-webpack-plugin/dist/index.js file

If you are using [email protected] just create this file on the patches folder and follow the "Set-up" instruction on patch-package page.

@ScriptedAlchemy ScriptedAlchemy merged commit a2ea759 into faceyspacey:master Sep 15, 2023
@ScriptedAlchemy
Copy link
Collaborator

Sorry <3 its been a while hehe

@ScriptedAlchemy
Copy link
Collaborator

released

@xiweiyizhi
Copy link

Why do it still use styles as body links when upgrading to 4.10.0

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.

8 participants