vercel/next.js

[SRI] `integrity` missing for stylesheets

darthmaim opened this issue · 0 comments

Link to the code that reproduces this issue

https://github.com/darthmaim-reproductions/vercel-next.js-74149

To Reproduce

  1. Clone the reproduction
  2. Run npm run build
  3. Open .next/server/app/index.html and observe that stylesheets don't have integrity set.
    <link rel="stylesheet" href="/_next/static/css/8da8fb13d9b551fb.css" data-precedence="next"/>

Current vs. Expected behavior

Included stylesheets currently don't get the integrity attribute.

Stylesheets should have integrity set.

Provide environment information

Node.js v22.5.1

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Tue Nov 5 00:21:55 UTC 2024
  Available memory (MB): 15953
  Available CPU cores: 8
Binaries:
  Node: 22.5.1
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 15.1.1-canary.13 // Latest available version is detected (15.1.1-canary.13).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

The stylesheet hash is correctly included in .next/server/subresource-integrity-manifest.json, its just missing in the html.

Related: