-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite 3/4/5 support for Quasar CLI with Vite #14077
Comments
any plan for this? |
I've made a clone of the quasar repo and changed the dependencies of {
...
"dependencies": {
...
"@vitejs/plugin-vue": "^3.1.0",
...
"vite": "^3.2.2",
...
} This way it uses Vite version 3. I'm only using SPA mode, however both There's a warning: modulePreload: { polyfill: false }, (I also had to update I'd assume there are more problems in SSR and other modes, but for SPA it seems to be pretty compatible. Are there significant known issues that prevent Vite 3 support from being added? Is there anything the community can do to make this happen? PR for the above maybe as a starting point? |
@BenceSzalai I worked a bit on this before, and those changes were enough to get a SPA project working as you said. Other modes could be more problematic as you said, didn't test them in depth myself. |
Is there any news on this or perhaps an ETA on when we can expect vite 3 support for |
This is huge a requirement for us. |
There is a temporary workaround (until the Quasar CLI gets released with Vite 4):
Trying to release the new q/app CLI with Vite 4 in January/February -- upgrading Vite is easy, but I also want to add a big new feature which will require a lot of dev time. And also, I want to reduce the number of major versions for the CLI to be released because backporting fixes is a potential huge pain. So grouping multiple new stuff in a single batch. Should the other feature take too long to implement, expect q/app with Vite 4 in January. |
Adding up on the temporary workaround, note that if you're using vue-i18n you'll need to remove |
or |
I've applied:
and switched vue-i18n to Now i get:
Edit:
|
Can confirm that the above workarounds are perfectly working. extendViteConf(viteConf) {
viteConf.logLevel = 'info';
}, The dependencies that were reported to cause a reload were then added to extendViteConf(viteConf) {
viteConf.logLevel = 'info';
viteConf.optimizeDeps.include = [
'@quasar/quasar-ui-qmarkdown',
'chart.js',
];
}, Hope this can help others. |
Browser debugging stopped working in VSCode after applying the vite overrides. |
Browser debugging works again by using these overrides:
|
Hi, I have added:
Replace But I get the following errors: Also I get the following error: The webpage is white, and the title in tab is <%= productName %>. Has someone make it to work in ssr mode, or there is a release date when the update will be available? Thanks. |
@george-dragnea The first notice ( |
@george-dragnea I am also getting |
I am sorry @alancnet but I haven't found any solution. |
temporary solved ssr in dev mode
any suggestion how to run in dist folder?
then i've got error like this
|
@ufhy could you try this ? extendViteConf (cfg, { isServer ) {
// module preload
delete cfg.build.polyfillModulePreload; // deprecated
cfg.build.modulePreload = { polyfill: true };
// devserver
cfg.appType = 'custom';
cfg.server.middlewareMode = true;
// only for server config
if (isServer) {
// let Vite generate a CJS bundle
cfg.ssr.format = 'cjs';
// use the same externalization heuristics of Vite v2
if (!cfg.legacy) { cfg.legacy = {}; }
cfg.legacy.buildSsrCjsExternalHeuristics = true;
}
} |
* Add .vue extension * Remove ~ prefix to editbox import * Switch to vite * Temporary workaround to use vite 4 See quasarframework/quasar#14077 (comment) * Status service fix access bug * Only import sentry if actually used Add DEV-only ENABLE_DEV_SENTRY if you want to use sentry during dev Defaults to off * Add apparantly missing babel quasar dep * WIP * Use vitest for testing Mostly broken for now, getCurrentInstance() returns null * vitest progress, removed @vue/compat * Fix router and ctx in tests * Fix mobile keyboard detection test * require -> import * More test fixing * Detect locale earlier to remove test warnings * WIP i18n plugin * Fixup more tests * <i18n-t> use global scope * Fix landing pages images for vite importing * Fix vue import * Update test scripts * vue-i18n fiddling Making sure it only uses runtime bundle in build * Initial new cropped photo dialog * New crop component for profile photo editing * Update ci test commands * Fix debounceAndFlushOnUnload w/ quasar debounce * Add mockBackend config, fixup linting errors * More test fixing up * Fix linting errors * Test fiddling * Some quasar conf rejigging for pwa * Better manifest setup * Fixup workbox config and add https serve option * Minor change * Configure coverage options * Ensure sentry is treeshaken * Update picker icon comment * Rename vite.config to vitest.config for clarity As it's only used for vitest * Remove debug logging * Fixup comment merge error * WIP group photo editing * New ChooseImage component to replace ChangePhoto * Unifify group photo and profile photo components * Use new cropper for activity banner image * Remove legacy image editing from conversation compose * Use new image upload for offer images * Add helpful comment * Tweaks now profile picture is block * Farewell vue-croppa! * Only set accept if specified * A little more vue-croppa removal * Remove old test * Fix profile picture on agreement page * Minor sentry importing changes * Add profile photo editing to settings * More outlined form inputs * Support mentions in offer description * Refine profile settings page * 26/9 activity banners instead of 21/9 * Add back in first-splash logo * Modernize and organise eslint config * Linting fixes * Remove jest stuff, and use esbuild targets * Avoid test warning * Remove comments pass size * Small alignment fixes * Fix linting * Set hidden file input style properly * Set body to overflow: auto with attachment gallery
still doesn't work on windows not mit v5 nor with any of the other suggestions. |
By the "new q/app-vite" I mean the next major version, not the current q/app-vite v1.x.y |
@sschneider-ihre-pvs I have it running with Vite 3/4 since ages. It also runs on Windows. With TypeScript, Yarn v3, Vite Plugins and custom path aliases. SPA, PWA and Capacitor modes. $ quasar info
Operating System - Windows_NT(10.0.22621) - win32/x64
NodeJs - 18.17.1
Global packages
NPM - 10.0.0
yarn - 3.6.3
@quasar/cli - undefined
@quasar/icongenie - Not installed
cordova - Not installed
Important local packages
quasar - 2.12.6 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
@quasar/app-vite - 1.5.1 -- Quasar Framework App CLI with Vite
@quasar/extras - 1.16.6 -- Quasar Framework fonts, icons and animations
eslint-plugin-quasar - Not installed
vue - 3.3.4 -- The progressive JavaScript framework for building modern web UI.
vue-router - 4.2.4
pinia - 2.1.6 -- Intuitive, type safe and flexible Store for Vue
vuex - Not installed
vite - 4.4.9 -- Native-ESM powered web dev build tool
Quasar App Extensions
@quasar/quasar-app-extension-qoverlay - 2.0.1 -- A Quasar App Extension
@quasar/quasar-app-extension-qcalendar - 4.0.0-beta.16 -- A Quasar App Extension for @quasar/quasar-ui-qcalendar
Networking
Host - ...
Ethernet - ...
vEthernet (Default Switch) - 172.31.208.1
vEthernet (WSL) - 172.18.48.1
|
for me it does not work
|
FYI: Build is broken in Vite UPDATE: Fixed in 5.0.0-beta.7 (vitejs/vite#14589) |
Still broken with the same error. |
this solved my i18n upgrade problem, thanks |
Adding Worked for me, "quasar build" works fine, but now I have another problem. In my company, we have multiple quasar projects working with nginx in different docker containers.
After reverting commits I found out that adding the "resolutions" option in package options is what makes quasar to not work, also it don't throw any error, looks like it's working but probably isn't, I don't know how to check it. As it shows an 502 error. I'm not asking for a solution, as I can't provide my code for reviewing. But just wanted to post this in case someone faces the same issue. I will look for another solution. |
Vite 5 has been released on Nov.16. Any news on Quasar CLI + Vite 5 integration ? Is it coming? Or can/should we setup it up ourselves? |
I tried to install vite 5 on quasar but i have this warning The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. Does anyone know how to solve it? |
@bonis955 These warnings are thrown because Quasar uses deprated APIs. You can ingore them. A future release of |
@bonis955 Can you briefly detail the steps required to use Vite 5? I believe I'm facing this bug, and don't know the best means to fix it: |
@jaybo i put this code in my package.json and it works
|
@bonis955 Zounds! That mostly works!
|
I'm posting this for anyone who wants to use
|
Any news about new q/app-vite? |
I just tried updating to Vite 5 (using the workaround above). It seems to work, but throws some deprecation notices:
|
Instead of a workaround, maybe would be better to create a new project using the beta version... clone the quasar repo git clone https://github.com/quasarframework/quasar.git uncomment beta choices on path/to/quasar/repo/create-quasar/templates/app/quasar-v2/index.js so, do a node path/to/quasar/repo/create-quasar of course, there is the risk of be using a early/beta version, but IMHO that is better than a workaround. |
So are we expected to create new projects and migrate our code in every time we want to upgrade the package? Seems like a lot of overhead for large projects. Ideally, we'd just update the package versions and be done with it. |
@DaleMckeown, dear @TobyMosque just provided yet another workaround for the time being. It might not work for everyone. When the major version gets documented and released publicly, you will not have to create a new project and migrate over your code. But, it will have to be more than just upgrading the packages for migrating over to a major version for sure. |
@yusufkandemir Thanks for providing additional clarity. |
maybe that can help u guys to upgrade u current project to use the beta app... |
Vite 5 (among a TON of other new features and improvements) is now available through q/app-vite v2.0.0-beta.1 Must read (all):
|
We already support Vite 3 for
@quasar/vite-plugin
starting from v3.1.0. We should support it in@quasar/app-vite
too, preferably without user-facing breaking changes, just like we did in the Vite plugin.https://vitejs.dev/guide/migration.html
We already weren't supporting Node 12, so that isn't a breaking change for us. I am not sure about the effect of the other changes, ATM.
The text was updated successfully, but these errors were encountered: