Skip to content

Commit 8e793ad

Browse files
committed
fix(nuxt): use resolved path for test component import
1 parent 9e8261a commit 8e793ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nuxt/src/app/components/test-component-wrapper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export default (url: string) => defineComponent({
1616
if (!path.startsWith(devRootDir)) {
1717
throw new Error(`[nuxt] Cannot access path outside of project root directory: \`${path}\`.`)
1818
}
19-
const comp = await import(/* @vite-ignore */ query.path as string).then(r => r.default)
19+
const comp = await import(/* @vite-ignore */ path as string).then(r => r.default)
2020
return () => [
21-
h('div', 'Component Test Wrapper for ' + query.path),
21+
h('div', 'Component Test Wrapper for ' + path),
2222
h('div', { id: 'nuxt-component-root' }, [
2323
h(comp, { ...attrs, ...props, ...urlProps }),
2424
]),

0 commit comments

Comments
 (0)