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
The hook will return string code to replace original import.meta.xx. Because the rolldown using Ast to codegen. It is difficult to implement it, it need to the oxc has some ways create ast from string, we could using parse at now. If you has good ideas, please let me know.
The text was updated successfully, but these errors were encountered:
It seems to be just a short-cut of transform hook. We could support it natively, since we would have transform step in the future for DCE and variables replacement.
However, supporting this requires us to call JsCallback while transforming. I intend not to and wonder if there are other solutions/workarounds.
The
resolveImportMeta
hook gives a way to allows to customizeimport.meta
andimport.meta.someProperty
, see herehttps://rollupjs.org/plugin-development/#resolveimportmeta. Here has a example for it.
The hook will return string code to replace original
import.meta.xx
. Because the rolldown using Ast to codegen. It is difficult to implement it, it need to the oxc has some ways create ast from string, we could usingparse
at now. If you has good ideas, please let me know.The text was updated successfully, but these errors were encountered: