Skip to content

Commit f47dd9a

Browse files
committedDec 2, 2023
fix: don't return absolute path in dev mode
1 parent 180bb30 commit f47dd9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/module/plugins/entry.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export const NuxtRootStubPlugin = createUnplugin((options: NuxtRootStubPluginOpt
1414
name: PLUGIN_NAME,
1515
enforce: 'pre',
1616
vite: {
17-
async resolveId(id) {
17+
async resolveId(id, importer) {
1818
if (id.endsWith('nuxt-vitest-app-entry')) {
19-
return join(dirname(options.entry), 'nuxt-vitest-app-entry')
19+
return importer?.endsWith('index.html') ? id : join(dirname(options.entry), 'nuxt-vitest-app-entry')
2020
}
2121
},
2222
async load(id) {

0 commit comments

Comments
 (0)
Please sign in to comment.