Closed FredrikNoren closed 7 months ago
The plugin is also listed when I run vite build --debug
:
vite:config using resolved config: {
vite:config plugins: [
vite:config 'vite:build-metadata',
vite:config 'vite:watch-package-data',
vite:config 'vite:pre-alias',
vite:config 'alias',
vite:config 'vite-plugin-wasm',
vite:config 'vite-plugin-svgr',
vite:config 'vite:react-babel',
vite:config 'vite:react-refresh',
vite:config 'vite-plugin-checker',
vite:config 'vite:modulepreload-polyfill',
vite:config 'vite:resolve',
vite:config 'vite:html-inline-proxy',
vite:config 'vite:css',
vite:config 'vite:esbuild',
vite:config 'vite:json',
vite:config 'vite:wasm-helper',
vite:config 'vite:worker',
vite:config 'vite:asset',
vite:config 'vite:wasm-fallback',
vite:config 'vite:define',
vite:config 'vite:css-post',
vite:config 'vite:build-html',
vite:config 'vite:worker-import-meta-url',
vite:config 'vite:asset-import-meta-url',
vite:config 'vite:force-systemjs-wrap-complete',
vite:config 'commonjs',
vite:config 'vite:data-uri',
vite:config 'vite:dynamic-import-vars',
vite:config 'vite:import-glob',
vite:config 'vite-plugin-top-level-await',
vite:config 'vite:build-import-analysis',
vite:config 'vite:esbuild-transpile',
vite:config 'vite:terser',
vite:config 'vite:reporter',
vite:config 'vite:load-fallback'
vite:config ],
This was because we were running the wasm inside of a worker; following the steps in the readme solved it (https://github.com/Menci/vite-plugin-wasm?tab=readme-ov-file#web-worker)
Hi,
I'm using
npm run dev
successfully, but for some reason it seems like the plugin is not detected when I runnpm run build
.Here's my config file:
The error in the console I'm getting is:
My devDeps:
Any idea what might be going on? This is in a brand new vite project. I'm using wasm-pack to build the wasm file.