Skip to content

Why is Quasar deliberately not pre-bundled with Vite? #14084

Discussion options

You must be logged in to vote

So after experimenting a bit, turns out the problem is tied to the jsTransform and vueTransform done in @quasar/vite-plugin. However, these 2 are essential in production for tree shaking.

So the solution would be:

  • DEV: disable those 2 transforms, Qusasar is pre-bundled as a single dependency by vite (no tree-shaking). This makes it faster for dev.
  • PROD: enable the 2 transforms (tree-shaking working).

There is also the optimizeDeps.exlude(['quasar']) that needs to be switched off/on depending on dev/prod.

I'll submit a PR later today.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@yusufkandemir
Comment options

@philfontaine
Comment options

Answer selected by philfontaine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants