-
Notifications
You must be signed in to change notification settings - Fork 30.9k
Link preload must have a valid as #84569
Copy link
Copy link
Labels
ReactRelated to React.Related to React.UpstreamRelated to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).
Metadata
Metadata
Assignees
Labels
ReactRelated to React.Related to React.UpstreamRelated to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).
Type
Fields
Give feedbackNo fields configured for Bug.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/kind-elbakyan-fgg4tv?workspaceId=ws_NduBwxz3MLYn31fcaz2JTB
To Reproduce
Import a .css file
Start the application in dev mode
A warning is logged for each css file:
Current vs. Expected behavior
Stylesheets should be correctly loaded, and not trigger a browser warning.
It appears because as="stylesheet" is not a valid as value. It should be style according to MDN.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 10 Binaries: Node: 22.20.0 npm: 10.8.2 Yarn: N/A pnpm: 10.17.1 Relevant Packages: next: 15.6.0-canary.45 // Latest available version is detected (15.6.0-canary.45). eslint-config-next: N/A react: 19.2.0 react-dom: 19.2.0 typescript: 5.9.3 Next.js Config: output: N/AWhich area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local), Vercel (Deployed), next start (local), Other (Deployed)
Additional context
The issue started showing up in 15.6.0-canary.32. Previous versions do not include a preload link for stylesheets.