Closed MartinX3 closed 6 months ago
Hi,
The error is absolutely expected. You are importing a UI file in a Node context (quasar.config file).
However, I've pushed a shimming mechanism for .vue files since I do see a benefit in your use-case. But like I said, please be aware of the fact that you are in a Node context while handling the quasar.config file. Such imported files do NOT go through the same pipeline as the UI code.
The new feature will be available in:
What happened?
Since using app-vite v2 I get
No loader is configured for ".vue"
when I want to import theroutes.ts
fromvue-router
to generate the sitemap via thevite-plugin-sitemap
pluginWith app-vite v1 I was using a quasar.config.js hack to load a quasar.config.ts where it worked flawless.
What did you expect to happen?
It imports the
routes.ts
to generate the sitemap.Reproduction URL
https://stackblitz.com/~/github.com/MartinX3/quasar-app-vite-vue-loader-test
How to reproduce?
quasar dev
orquasar build
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)
Platforms/Browsers
Chrome
Quasar info output
Relevant log output
Additional context
If there is a better way to generate the sitemap I would be thankful.