-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
feat: unstable_subResourceIntegrity #13163
base: dev
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 1f21bdf The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…`<Scripts>` and `unstable_subResourceIntegrity` future flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR introduces the "unstable_subResourceIntegrity" future flag to generate an importmap with integrity hashes for browser-loaded scripts. Key changes include generating an SRI manifest in the Vite plugin, updating manifest types and configurations to support the new flag, and modifying tests and playground configurations accordingly.
Reviewed Changes
File | Description |
---|---|
packages/react-router-dev/vite/plugin.ts | Adds SRI manifest generation and updates file system access. |
.changeset/late-falcons-sort.md | Updates changeset with the new feature flag message. |
playground/framework/react-router.config.ts | Enables the unstable flag in the playground configuration. |
pnpm-lock.yaml | Updates dependency versions related to the changes. |
playground/framework/app/root.tsx | Minor formatting adjustment. |
packages/react-router/lib/dom/ssr/entry.ts | Extends FutureConfig to include the new flag. |
packages/react-router/lib/dom/ssr/components.tsx | Renders SRI attributes in script and preload links. |
packages/react-router-dev/manifest.ts | Updates the manifest type with an optional sri field. |
packages/react-router-dev/config/config.ts | Propagates the new flag in configuration resolution. |
packages/react-router/lib/dom/ssr/routes-test-stub.tsx | Updates test stub to reflect the new flag. |
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
packages/react-router-dev/vite/plugin.ts:823
- The 'recursive' option is not supported in fs.readdirSync. Consider using a dedicated recursive file walker or fs.promises API with recursion to traverse subdirectories.
let entries = fs.readdirSync(clientBuildDirectory, {
Introduce
unstable_subResourceIntegrity
future flag that enables generation of an importmap with integrity for the scripts that will be loaded by the browser.Available in
0.0.0-experimental-35027c3be