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: 2 additions & 0 deletions packages/vite/src/node/optimizer/esbuildDepPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const externalTypes = [
'stylus',
'pcss',
'postcss',
// wasm
'wasm',
// known SFC types
'vue',
'svelte',
Expand Down
4 changes: 2 additions & 2 deletions packages/vite/src/node/optimizer/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ function esbuildScanPlugin(
// they are done after the bare import resolve because a package name
// may end with these extensions

// css & json
// css & json & wasm
build.onResolve(
{
filter: /\.(css|less|sass|scss|styl|stylus|pcss|postcss|json)$/
filter: /\.(css|less|sass|scss|styl|stylus|pcss|postcss|json|wasm)$/
},
externalUnlessEntry
)
Expand Down