Skip to content

Commit 71a86be

Browse files
authored
refactor(wasm): remove native wasm helper plugin usage (#21566)
1 parent 416c095 commit 71a86be

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export async function resolvePlugins(
9898
esbuildBannerFooterCompatPlugin(config),
9999
config.oxc !== false ? oxcPlugin(config) : null,
100100
nativeJsonPlugin({ ...config.json, minify: isBuild }),
101-
wasmHelperPlugin(config),
101+
wasmHelperPlugin(),
102102
webWorkerPlugin(config),
103103
assetPlugin(config),
104104

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { exactRegex } from 'rolldown/filter'
2-
import { viteWasmHelperPlugin as nativeWasmHelperPlugin } from 'rolldown/experimental'
32
import type { Plugin } from '../plugin'
4-
import type { ResolvedConfig } from '..'
53
import { fileToUrl } from './asset'
64

75
const wasmHelperId = '\0vite/wasm-helper.js'
@@ -50,13 +48,7 @@ const wasmHelper = async (opts = {}, url: string) => {
5048

5149
const wasmHelperCode = wasmHelper.toString()
5250

53-
export const wasmHelperPlugin = (config: ResolvedConfig): Plugin => {
54-
if (config.isBundled) {
55-
return nativeWasmHelperPlugin({
56-
decodedBase: config.decodedBase,
57-
})
58-
}
59-
51+
export const wasmHelperPlugin = (): Plugin => {
6052
return {
6153
name: 'vite:wasm-helper',
6254

0 commit comments

Comments
 (0)