Cannot read .vue files of external packages
Hi, I encountered a problem when registering a package's exported SFCs with a nuxt module:
Here is the reproduction; it's a pnpm monorepo. There is a
Things to note:
-
- If the nuxt app were located in the monorepo's root, or there were no monorepo, the error is not thrown. Here's also the reproduction of that.
Are there, perhaps, some vite configuration options that could fix this?
Here is the reproduction; it's a pnpm monorepo. There is a
pkg package that simply exports a Test.vue component, and a nuxt-app that simply renders it. The Test component is registered with a module using addComponent.Things to note:
-
nuxt-app installs pkg with the file: protocol (pkg is packed with pnpm pack); if the workspace: protocol is used instead, the error is not thrown.- If the nuxt app were located in the monorepo's root, or there were no monorepo, the error is not thrown. Here's also the reproduction of that.
Are there, perhaps, some vite configuration options that could fix this?
StackBlitz
Starter project for Node.js, a JavaScript runtime built on Chrome's V8 JavaScript engine
StackBlitz
Starter project for Node.js, a JavaScript runtime built on Chrome's V8 JavaScript engine
