Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: scanner and optimizer should skip wasm #9257

Merged
merged 1 commit into from Jul 20, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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