Can I get or set global variables in Node.js when I am using SWC? #9526
Unanswered
zhangmingyuan666
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using rspack in Node.js, and use swc-loader as the loader of js files. I need to get or set some global variables in node.js to do something.
In babel plugin, I always use
global
likeglobal.storeInfo
to get global variables in node.js.But in swc plugin, I have to write plugin in rust environment and then build it as wasm to work in Node.js environment. Can I get or set node.js global variables in swc plugin?
My Node version is 18.18.0, my swc plugin's swc_core version is 0.91.0
Beta Was this translation helpful? Give feedback.
All reactions