Move `src` and `app` aliases to the end of `path` section in `.quasar/tsconfig.json`
What happened?
They placed at the beginning of path section, so automatic imports (at least in vs code) starts with 'src/...
What did you expect to happen?
If they'll be moved to the end of path section, automatic imports finds first more compact variant of import, i.e. stores/store instead of src/stores/store, that makes code less 'noisy'.
Reproduction URL
https://stackblitz.com/edit/quasarframework-stackblitz-templates-dtyc5iwp?file=src%2Fpages%2FIndexPage.vue&title=Quasar%20Framework%20-%20app-vite%20v2
How to reproduce?
delete .quasar folder in project
run npx quasar prepare
look in .quasar/tsconfig.json
this must be at the end of section for short auto imports
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
No response
Quasar info output
Relevant log output
Additional context
No response
Does stores/store import src/stores/store or app/stores/store?
Does
stores/storeimportsrc/stores/storeorapp/stores/store?
@stefanvanherwijnen they are all aliases for the same file: project_folder/src/stores/store.ts or '.js'
Autoimport in VS Code check aliases from first to last and use src/stores/store now and stores/store after fix.
Does
stores/storeimportsrc/stores/storeorapp/stores/store?@stefanvanherwijnen they are all aliases for the same file:
project_folder/src/stores/store.tsor '.js'Autoimport in VS Code check aliases from first to last and use
src/stores/storenow andstores/storeafter fix.
I believe app points to the project folder. My point is that you can't just remove the alias, or you would need to alias stores. Keep in mind that it's not just TS aliases, but also Vite aliases.
I suggest not to remove aliases, but to move them to the end of paths. All imports will continue working.
alias for project folder is app, so without app\... no file can be imported from root of project. This is current berhaviour, and it is the same after fix.
Fix corrects only autoimport behavior to use more compact imports in VS code. All aliases are present in current tsconfig.ts
When you write const myStore = useStore and press ctrl+space, autoimport in VS Code check aliases from first to last and use src/stores/store now and stores/store after fix. If you manually change import to stores/store - everything continued working.
off: sorry for bad english
You are probably right for tsconfig, but I'm pretty sure this would break the Vite aliases.
I'm now working with this fix applied. yarn serve and yarn build are working perfectly.