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

Some JavaScript chunks missing integrity attribute in production build #76751

Open
lance-shuai opened this issue Mar 3, 2025 · 0 comments
Open
Labels
Output Related to the the output configuration option.

Comments

@lance-shuai
Copy link

Link to the code that reproduces this issue

https://github.com/lance-shuai/next-sri-test

To Reproduce

Create a new Next.js project
Enable SRI in next.config.js:
npm run build
npm run start

Current vs. Expected behavior

When building Next.js app in production mode with SRI enabled, I noticed that some JavaScript chunks are missing the integrity attribute in their script tags, while others have it properly set.

Image

Provide environment information

/bin/sh: yarn: command not found

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:06:57 PDT 2024; root:xnu-11215.41.3~3/RELEASE_ARM64_T6041
  Available memory (MB): 24576
  Available CPU cores: 12
Binaries:
  Node: 20.18.3
  npm: 10.8.2
  Yarn: N/A
  pnpm: 10.4.0
Relevant Packages:
  next: 15.2.0 // Latest available version is detected (15.2.0).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.8.2
Next.js Config:
  output: N/A

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

Output

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

next start (local)

Additional context

No response

@github-actions github-actions bot added the Output Related to the the output configuration option. label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Output Related to the the output configuration option.
Projects
None yet
Development

No branches or pull requests

1 participant