Closed sschneider-ihre-pvs closed 7 months ago
Hi @sschneider-ihre-pvs! 👋
It looks like you provided an invalid or unsupported reproduction URL. Do not use any service other than Codepen, jsFiddle, StackBlitz, Codesandbox, and GitHub. Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc. Please edit your original post above and provide a valid reproduction URL as explained.
Without a proper reproduction, your issue will have to get closed.
Thank you for your collaboration. 👏
For getting aliases from tsconfig.json
into Vite, you can use https://github.com/aleclarson/vite-tsconfig-paths
// quasar.conf file > build
vitePlugins: [
['vite-tsconfig-paths']
]
Keeping this issue open so we can update the docs with this tip. However, I am pretty sure Webpack wasn't picking up the aliases from tsconfig.json
automatically, that should be a Webpack plugin you were using. So, this information can go into the "adding aliases" section, not into the migration guide.
Sadly, that does not count for the src/App.vue. I get the same error here which is a showstopper
For this you would need to fill a bug report with a reproduction, it's impossible to help otherwise.
Ok I will try that first, and report back.
ok that seems to work better except for path aliases that contain an @
like internal monorepo dependencies that usually start with @${projectName}/something
ok it seems that the solution is to add this for monorepos
// quasar.conf file > build
vitePlugins: [
['vite-tsconfig-paths', { projects: ["../../tsconfig.base.json", "./tsconfig.json"] }]
]
What happened?
Following the migration guide I edited files and copied source files. I only build SPA. First, there is no easy way to get the path aliases from typescript into vite within the quasar.config.js. Second, vite is unable to load the src/css/app.sass and throws an error in the browser that the file was blocked due to disallowed MIME Type "". When adding an alias it now can be found. Sadly, that does not count for the src/App.vue. I get the same error here which is a showstopper
What did you expect to happen?
The migration guide towards app-vue would be working with typescript, path aliases
Reproduction URL
unable to provice one
How to reproduce?
Following the migration guide steps and start quasar dev
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite), Quasar Extras (@quasar/extras), TypeScript Support, SPA Mode
Platforms/Browsers
Firefox
Quasar info output
Relevant log output
No response
Additional context
No response