Reproduction
Building Codiff with vp build emits warnings like:
[INVALID_ANNOTATION] A comment "/*#__PURE__*/" in "node_modules/@lexical/react/dist/LexicalErrorBoundary.prod.mjs" contains an annotation that Rolldown cannot interpret due to the position of the comment.
- comment ignored due to position in node_modules/@lexical/react/dist/LexicalErrorBoundary.prod.mjs at 581..594
│
│ Help: For more information on how to use pure annotations correctly, check the documentation: https://rolldown.rs/in-depth/dead-code-elimination#pure
I hit the same warning for multiple @lexical/react files under node_modules.
Problems
INVALID_ANNOTATION is rendered in red even though this is only a warning, which makes the build look broken.
- The warning points at a transitive dependency in
node_modules, so the app author usually can't do anything about it directly.
- Because the warning shows up on every build, it creates noise for humans and coding agents that keep re-flagging it as if it were a real failure.
Expected
A few possible improvements:
- render this warning in a warning color instead of an error color
- reduce or suppress this class of warning for
node_modules / transitive dependencies
- or otherwise make it clearer that Rolldown is safely ignoring the misplaced annotation and the build is still fine
Notes
The current behavior is technically correct, but the UX is pretty rough for downstream consumers when the source is third-party code.
Reproduction
Building Codiff with
vp buildemits warnings like:I hit the same warning for multiple
@lexical/reactfiles undernode_modules.Problems
INVALID_ANNOTATIONis rendered in red even though this is only a warning, which makes the build look broken.node_modules, so the app author usually can't do anything about it directly.Expected
A few possible improvements:
node_modules/ transitive dependenciesNotes
The current behavior is technically correct, but the UX is pretty rough for downstream consumers when the source is third-party code.