Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(vite): use more strict app entry check in dev-bundler (#5959)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Jul 17, 2022
1 parent 0839e93 commit ffd40d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/dev-bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function transformRequest (opts: TransformOptions, id: string) {
if (id.match(/^\/\w:/)) {
id = id.slice(1)
}
} else if (!id.includes('entry') && id.startsWith('/')) {
} else if (id.startsWith('/') && !(/\/app\/entry(|.mjs)$/.test(id))) {
// Relative to the root directory
const resolvedPath = resolve(opts.viteServer.config.root, '.' + id)
if (existsSync(resolvedPath)) {
Expand Down

0 comments on commit ffd40d1

Please sign in to comment.