mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(vite): use more strict app entry check in dev-bundler (#5959)
This commit is contained in:
parent
0839e93333
commit
ffd40d16c8
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user