Skip to content

Commit

Permalink
fix: scanner and optimizer should skip wasm (#9257)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jul 20, 2022
1 parent aa0b921 commit c616077
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/node/optimizer/esbuildDepPlugin.ts
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
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

0 comments on commit c616077

Please sign in to comment.