Menci / vite-plugin-top-level-await

Transform code to support top-level await in normal browsers for Vite.
MIT License
273 stars 15 forks source link

[vite-plugin-top-level-await] Failed to convert rust String into napi string #58

Open crimson-med opened 3 months ago

crimson-med commented 3 months ago

We are using federation and having an issue on how the code gets transpiled for the MFE.

We do have a working repo with the issue:

https://github.com/paloitsingapore/spreadjs-vite

x Build failed in 43.58s
error during build:
[vite-plugin-top-level-await] Failed to convert rust `String` into napi `string`
Error: Failed to convert rust `String` into napi `string`
Warning: command "vite build" exited with non-zero status code
asd500asd commented 2 months ago

I also encountered the same problem. It was normal in dev, but this error occurred during build. I haven't found a solution yet.

Menci commented 1 week ago

Seems an SWC issue?