Repository navigation
fix(react): turn off Rolldown's module-level directive warnings - #1158
Merged
Merged
Conversation
Every html build warns once for each dependency module marked `"use client"` (`@node-core/ui-components` and the Radix packages it uses): 34 warnings when building the Node.js docs, the same 17 modules in both the server and the client bundles. Neither Vite nor Rolldown filters them by default. The directive is for React Server Components, which these builds don't use, and Rolldown drops it from bundled modules by design (see https://rolldown.rs/in-depth/directives#other-directives). Its `checks.moduleLevelDirective` option now defaults to off, and a project's own `rolldownOptions.checks` still overrides it. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1158 +/- ##
==========================================
+ Coverage 92.64% 92.65% +0.01%
==========================================
Files 244 244
Lines 23114 23147 +33
Branches 2263 2265 +2
==========================================
+ Hits 21413 21446 +33
Misses 1692 1692
Partials 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
AugustinMauroy
approved these changes
Oct 9, 2026
avivkeller
approved these changes
Oct 9, 2026
Member
Author
|
@nodejs/web-infra merging as a hot-fix! |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR turns off Rolldown's warnings about module-level directives in the
htmlgenerator's Vite builds.@node-core/ui-componentsand the Radix packages it uses mark their modules"use client", and every build warns once per module: 34 warnings when building the Node.js docs, the same 17 modules in both the server and the client bundles. The directive is for React Server Components, which these builds don't use, and Rolldown drops it from bundled modules by design (Other directives), so the warnings are only noise.checks.moduleLevelDirectivenow defaults tofalse, and a project's ownrolldownOptions.checksstill overrides it.Validation
htmltarget logs nothing, down from 34 warnings, and the output is byte-identical tomain's.vite.test.mjscovers the default and the override.Related Issues
Noticed while working on #1156.
Check List
node --run testand all tests passed.node --run format:check&node --run lint.