Important! There is an "Upgrade guide" page under the "Quasar CLI with Vite" menu section in the docs. Please read it top to bottom before proceeding with the upgrade.
Notable breaking changes
- Minimum Node.js version is now 18 (mainly due to Vite 5)
- We have shifted towards an ESM style for the whole Quasar project folder, so many default project files now require ESM code (although using
.cjs
as an extension for these files is supported, but you will most likely need to rename the extension should you not wish to change anything). One example is the/quasar.config.js
file which now it's assumed to be ESM too (so change from.js
to.cjs
should you still want a CommonJs file). - The "test" cmd was removed due to latest updates for @quasar/testing-* packages. See here
- The "clean" cmd has been re-designed. Type "quasar clean -h" in your upgraded Quasar project folder for more info.
- Typescript detection is based on the quasar.config file being in TS form (quasar.config.ts) and tsconfig.json file presence.
- feat+refactor(app-vite): ability to run multiple modes + dev/build simultaneously (huge effort!)
- SSR and Electron modes now build in ESM format.
- We will detail more breaking changes for each of the Quasar modes in the docs. There is an "Upgrade guide" page under the "Quasar CLI with Vite" menu section.
Highlights on what's new
Some of the work below has already been backported to the old @quasar/app-vite v1, but posting here for reader's awareness.
- feat(app-vite): upgrade to Vite 5
- feat(app-vite): ability to run multiple quasar dev/build commands simultaneously (example: can run "quasar dev -m capacitor" and "quasar dev -m ssr" and "quasar dev -m capacitor -T ios" simultaneously)
- feat(app-vite): Better TS typings overall
- refactor(app-vite): port CLI to ESM format (major effort! especially to support Vite 5 and SSR)
- feat(app-vite): support for quasar.config file in multiple formats (.js, .mjs, .ts, .cjs)
- feat(app-vite): Improve quasarConfOptions, generate types for it, improve docs (fix: #14069) (#15945)
- feat(app-vite): reload app if one of the imports from quasar.config file changes
- feat(app-vite): TS detection should keep account of quasar.config file format too (quasar.config.ts)
- feat(app-vite): support for SSR development with HTTPS
- feat(app-vite): env dotfiles support #15303
- feat(app-vite): New quasar.config file props: build > envFolder (string) and envFiles (string[])
- feat(app-vite): reopen browser (if configured so) when changing app url through quasar.config file
- feat&perf(app-vite): faster & more accurate algorithm for determining node package manager to use
- feat(app-vite): upgrade deps
- feat(app-vite): remove workaround for bug in Electron 6-8 in cli templates (#15845)
- feat(app-vite): remove bundleWebRuntime config for Capacitor v5+
- feat(app-vite): use workbox v7 by default
- feat(app-vite): quasar.config > pwa > injectPwaMetaTags can now also be a function: (({ pwaManifest, publicPath }) => string);
- feat(app-vite): quasar.config > build > htmlMinifyOptions
- feat(app-vite): lookup open port for vue devtools when being used; ability to run multiple cli instances with vue devtools
- perf(app-vite): SSR render-template in specific esm or cjs form, according to host project; interpolation by variable
- perf(app-vite): only verify quasar.conf server address for "dev" cmd
- feat(app-vite): pick new electron inspect port for each instance
- feat(app-vite): Electron - can now load multiple preload scripts
- refactor(app-vite): AE support - better and more efficient algorithms
- feat(app-vite): AE support for ESM format
- feat(app-vite): AE support for TS format (through a build step)
- feat(app-vite): AE API new methods -> hasTypescript() / hasLint() / getStorePackageName() / getNodePackagerName()
- feat(app-vite): AE -> Prompts API (and ability for prompts default exported fn to be async)
- refactor(app-vite): the "clean" cmd now works different, since the CLI can be run in multiple instances on the same project folder (multiple modes on dev or build)
- feat(app-vite): Support for Bun as package manager #16335
- feat(app-vite): for default /src-ssr template -> prod ssr -> on error, print err stack if built with debugging enabled
Env dotfiles support
Expanding a bit on the env dotfiles support. These files will be detected and used (the order matters):
.env # loaded in all cases
.env.local # loaded in all cases, ignored by git
.env.[dev|prod] # loaded for dev or prod only
.env.local.[dev|prod] # loaded for dev or prod only, ignored by git
.env.[quasarMode] # loaded for specific Quasar CLI mode only
.env.local.[quasarMode] # loaded for specific Quasar CLI mode only, ignored by git
.env.[dev|prod].[quasarMode] # loaded for specific Quasar CLI mode and dev|prod only
.env.local.[dev|prod].[quasarMode] # loaded for specific Quasar CLI mode and dev|prod only, ignored by git
...where "ignored by git" assumes a default project folder created after releasing this package, otherwise add .env.local*
to your /.gitignore
file.
You can also configure the files above to be picked up from a different folder or even add more files to the list:
// quasar.config file
build: {
envFolder: '../' // absolute or relative path to root project folder
envFiles: [
// Path strings to your custom files --- absolute or relative path to root project folder
]
}
Donations
Quasar Framework is an open-source MIT-licensed project made possible due to the generous contributions by sponsors and backers. If you are interested in supporting this project, please consider the following: