You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered:
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.
Provide environment information
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
The text was updated successfully, but these errors were encountered: