Skip to content

Commit

Permalink
fix(nuxt): use resolved path for test component import
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed May 7, 2024
1 parent 9e8261a commit 8e793ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nuxt/src/app/components/test-component-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default (url: string) => defineComponent({
if (!path.startsWith(devRootDir)) {
throw new Error(`[nuxt] Cannot access path outside of project root directory: \`${path}\`.`)
}
const comp = await import(/* @vite-ignore */ query.path as string).then(r => r.default)
const comp = await import(/* @vite-ignore */ path as string).then(r => r.default)
return () => [
h('div', 'Component Test Wrapper for ' + query.path),
h('div', 'Component Test Wrapper for ' + path),
h('div', { id: 'nuxt-component-root' }, [
h(comp, { ...attrs, ...props, ...urlProps }),
]),
Expand Down

0 comments on commit 8e793ad

Please sign in to comment.