Skip to content

[SRI] integrity missing for stylesheets #74149

@darthmaim

Description

@darthmaim

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions