Skip to content
Discussion options

You must be logged in to vote

The rolldownOptions.experimental.nativeMagicString setting controls whether Rolldown's internal transforms pass a native MagicString instance to its own processing pipeline — it doesn't expose MagicString objects to plugin hooks.

Looking at the Rolldown docs you linked, the native MagicString feature is about performance optimization for Rolldown's built-in transforms (like module wrapping, tree-shaking, etc.) by using a Rust-backed MagicString instead of the JS one. It's not designed to surface in the meta argument of plugin transform hooks.

The meta object in plugin hooks only contains moduleType and ssr because those are the metadata fields Vite/Rolldown exposes to plugins. The native …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LinusCenterstrom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants