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

Commit 16faf4e

Browse files
committed
simplify regex
1 parent 5d8a460 commit 16faf4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/dev-bundler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async function transformRequest (opts: TransformOptions, id: string) {
6363
if (id.match(/^\/\w:/)) {
6464
id = id.slice(1)
6565
}
66-
} else if (id.startsWith('/') && !(/\/app\/(entry|entry.mjs)$/.test(id))) {
66+
} else if (id.startsWith('/') && !(/\/app\/entry(|.mjs)$/.test(id))) {
6767
// Relative to the root directory
6868
const resolvedPath = resolve(opts.viteServer.config.root, '.' + id)
6969
if (existsSync(resolvedPath)) {

0 commit comments

Comments
 (0)