Skip to content

Commit 6873fe1

Browse files
committed
fix(vite): don't alias pkg name to avoid vitesse build bug
1 parent 56c88e1 commit 6873fe1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/vite/src/plugins/alias.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,10 @@ export const AliasRuntimePlugin = () => createUnplugin<AliasPluginOptions>((user
7878
}
7979
},
8080
async webpack(compiler) {
81-
const { pkg, provider, runtime } = await fetchPaths()
81+
const { provider, runtime } = await fetchPaths()
8282

8383
compiler.options.resolve.alias = {
8484
...compiler.options.resolve.alias || {},
85-
[PkgName]: pkg,
8685
[AliasProvider]: provider,
8786
[AliasRuntime]: runtime,
8887
}
@@ -108,8 +107,6 @@ export const AliasRuntimePlugin = () => createUnplugin<AliasPluginOptions>((user
108107
config.resolve = config.resolve || {}
109108
config.resolve.alias = config.resolve.alias || {}
110109
// @ts-expect-error untyped
111-
config.resolve.alias[PkgName] = pkg
112-
// @ts-expect-error untyped
113110
config.resolve.alias[AliasProvider] = provider
114111
// @ts-expect-error untyped
115112
config.resolve.alias[AliasRuntime] = runtime

0 commit comments

Comments
 (0)