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 am really a big fan of this plugin, thank you for maintaining it!
I have a Vite Web Worker where I'm using this plugin.
Funny enough, it works in dev mode and breaks when I try to build (opposite of what we saw last year. Sigh...)
Is there any chance you know what is going wrong here? It's as if your plugin needs to run first, and have the code transformed before it gets to the worker plugin?
// worker.jsimportwasmfrom'../../../crates/seed-bindgen/Cargo.toml';exportletgenerate,encrypt,decrypt;asyncfunctioninit(){if(!import.meta.env.SSR){({ generate, encrypt, decrypt }=awaitwasm());console.log('wasm ready',{ generate, encrypt, decrypt });}}init();// set up web worker messagingonmessage=async(e)=>{// ...etc
Error [RollupError]: The keyword 'package' is reserved (Note that you need plugins to import files that are not JavaScript)
code: 'PLUGIN_ERROR',
frame: '1: [package]\n ^\n2: edition = "2021"\n3: name = "seed-bindgen"',
pluginCode: 'PARSE_ERROR',
plugin: 'vite:worker-import-meta-url',
hook: 'transform'
}
Node.js v18.5.0
The text was updated successfully, but these errors were encountered:
I am really a big fan of this plugin, thank you for maintaining it!
I have a Vite Web Worker where I'm using this plugin.
Funny enough, it works in
dev
mode and breaks when I try tobuild
(opposite of what we saw last year. Sigh...)Is there any chance you know what is going wrong here? It's as if your plugin needs to run first, and have the code transformed before it gets to the worker plugin?
The error log
The text was updated successfully, but these errors were encountered: