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

Commit

Permalink
simplify regex
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 17, 2022
1 parent 5d8a460 commit 16faf4e
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.startsWith('/') && !(/\/app\/(entry|entry.mjs)$/.test(id))) {
} 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 16faf4e

Please sign in to comment.