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
I have a swc plugin "use-client", I want to print some info when run this plugin, so I used web_sys::console::log_1 in my code, when I npm link to this repo https://github.com/coder-xiaotian/antd-useclient, thennpm run dev to start, it has the error of below:
Caused by:
0: failed to invoke `/Users/xiaotian/personal/tech/my-project/use-client/target/wasm32-wasi/release/swc_plugin_use_client.wasm` as js transform plugin at /Users/xiaotian/personal/tech/my-project/use-client/target/wasm32-wasi/release/swc_plugin_use_client.wasm
1: Error while importing "__wbindgen_placeholder__"."__wbindgen_string_new": unknown import. Expected Function(FunctionType { params: [I32, I32], results: [I32] })
- error Error: Cannot find module '/Users/xiaotian/personal/tech/my-project/antd-useclient/.next/fallback-build-manifest.json'
It doesn't look like SWC plugins use wasm-bindgen at all, actually, so nothing wasm-bindgen-related is going to work. It looks like tracing is what SWC expects plugins to use for logging, so you should probably use that instead.
It doesn't look like SWC plugins use wasm-bindgen at all, actually, so nothing wasm-bindgen-related is going to work. It looks like tracing is what SWC expects plugins to use for logging, so you should probably use that instead.
Thanks for your reply. It seems like I made a mistake. I will study it again.
Describe the Bug
I have a swc plugin "use-client", I want to print some info when run this plugin, so I used
web_sys::console::log_1
in my code, when I npm link to this repo https://github.com/coder-xiaotian/antd-useclient, thennpm run dev
to start, it has the error of below:Additional Context
build command: cargo build-wasi --release
rustc version: rustc 1.70.0 (90c541806 2023-05-31)
The text was updated successfully, but these errors were encountered: