Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export async function resolvePlugins(
esbuildBannerFooterCompatPlugin(config),
config.oxc !== false ? oxcPlugin(config) : null,
nativeJsonPlugin({ ...config.json, minify: isBuild }),
wasmHelperPlugin(config),
wasmHelperPlugin(),
webWorkerPlugin(config),
assetPlugin(config),

Expand Down
10 changes: 1 addition & 9 deletions packages/vite/src/node/plugins/wasm.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { exactRegex } from 'rolldown/filter'
import { viteWasmHelperPlugin as nativeWasmHelperPlugin } from 'rolldown/experimental'
import type { Plugin } from '../plugin'
import type { ResolvedConfig } from '..'
import { fileToUrl } from './asset'

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

const wasmHelperCode = wasmHelper.toString()

export const wasmHelperPlugin = (config: ResolvedConfig): Plugin => {
if (config.isBundled) {
return nativeWasmHelperPlugin({
decodedBase: config.decodedBase,
})
}

export const wasmHelperPlugin = (): Plugin => {
return {
name: 'vite:wasm-helper',

Expand Down
Loading