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

[NEXT-771] Preload incorrectly added for nomodule polyfill script #46793

Closed
timneutkens opened this issue Mar 5, 2023 · 7 comments
Closed

[NEXT-771] Preload incorrectly added for nomodule polyfill script #46793

timneutkens opened this issue Mar 5, 2023 · 7 comments

Comments

@timneutkens
Copy link
Member

The nomodule polyfill scripts shouldn't add a preload as it'll cause it to be preloaded in all browsers.

Report: #41745 (comment)

From SyncLinear.com | NEXT-771

@IgorKowalczyk
Copy link
Contributor

I also have the same issue

image
image

    Operating System:
      Platform: linux
      Arch: x64
      Version: #1 SMP Debian 5.10.140-1 (2022-09-02)
    Binaries:
      Node: 16.15.1
      npm: 9.0.1
      Yarn: N/A
      pnpm: 7.19.0
    Relevant packages:
      next: 13.2.3
      eslint-config-next: 13.2.3
      react: 18.2.0
      react-dom: 18.2.0

@Confuze
Copy link

Confuze commented Mar 7, 2023

Dealing with the same issue, it adds 30kB of an unnecessary js bundle.
image
image

@bwalding
Copy link

bwalding commented Mar 10, 2023

Another issue I ran into with the preload change (that occurred in 13.2.2) is that there is no nonce on the <link> element - this caused a lot of CSP reports in Chrome (which requires a nonce IIUC). Firefox does not need a nonce on the preload links.

The site doesn't break - because the actual scripts all have a nonce - but our CSP reporting was getting hammered by the preloads failing and getting reported.

I'm not sure if this is all part of the same issue - or whether it deserves a whole new ticket.

@JesseKoldewijn
Copy link
Contributor

I'm also having this issue and though it might be fixable with a browserslist (since something similar used to work on next12) but no dice.

@ijjk
Copy link
Member

ijjk commented Mar 14, 2023

Closing as this is fixed in #46970 which is available in v13.2.4-canary.9 of Next.js

@ijjk ijjk closed this as completed Mar 14, 2023
@JesseKoldewijn
Copy link
Contributor

Awesome! Nice one!👌😁

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2023
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

6 participants