Skip to content

Commit 94c97b7

Browse files
authored
feat(native-plugin): use js wasm helper in dev environment (#245)
1 parent bf84ccb commit 94c97b7

File tree

1 file changed

+4
-1
lines changed
  • packages/vite/src/node/plugins

1 file changed

+4
-1
lines changed

packages/vite/src/node/plugins/wasm.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ const wasmHelper = async (opts = {}, url: string) => {
5454
const wasmHelperCode = wasmHelper.toString()
5555

5656
export const wasmHelperPlugin = (config: ResolvedConfig): Plugin => {
57-
if (config.experimental.enableNativePlugin === true) {
57+
if (
58+
config.experimental.enableNativePlugin === true &&
59+
config.command === 'build'
60+
) {
5861
return nativeWasmHelperPlugin()
5962
}
6063

0 commit comments

Comments
 (0)