I'm working on a plugin for the SWC compiler and I'm trying to pass a parameter from the Next.js configuration to the plugin. However, I'm having trouble accessing this parameter within the plugin. I've been trying to find a solution for a long time, but I haven't been successful so far.
Here's how I'm passing the parameter in the Next.js configuration:
const nextConfig = {
experimental: {
swcPlugins: [
[require.resolve("./plugin.wasm"), {param:"test1"}]
],
},
}
Could someone please guide me on how to retrieve this parameter inside the plugin? Any help would be greatly appreciated. Thank you!