Skip to content

Commit 287fce1

Browse files
committed
fix(alias-plugin): resolve stackblitz not transforming
1 parent 09e3b54 commit 287fce1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/vite/src/plugins/alias.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createUnplugin } from 'unplugin'
22
import MagicString from 'magic-string'
3-
import { fileURLToPath, resolvePath } from 'mlly'
3+
import { resolvePath } from 'mlly'
44
import { dirname } from 'pathe'
55
import { AliasProvider, AliasRuntime, PkgName } from '@vueuse/schema-org'
66

@@ -48,9 +48,9 @@ export const AliasRuntimePlugin = () => createUnplugin<AliasPluginOptions>((user
4848
runtime = userConfig.paths?.runtime || `${pkg}/runtime`
4949
}
5050
paths = {
51-
pkg: fileURLToPath(pkg),
52-
provider: fileURLToPath(provider),
53-
runtime: fileURLToPath(runtime),
51+
pkg,
52+
provider,
53+
runtime,
5454
}
5555
return paths
5656
}
@@ -62,7 +62,7 @@ export const AliasRuntimePlugin = () => createUnplugin<AliasPluginOptions>((user
6262
await fetchPaths()
6363
},
6464
transformInclude(id) {
65-
return id.startsWith(paths.pkg)
65+
return id.includes(paths.pkg)
6666
},
6767
transform(code) {
6868
// swap out aliases for real paths

0 commit comments

Comments
 (0)