Open ChronosMasterOfAllTime opened 1 year ago
Any updates on this?
Can confirm this is affecting our apps as well when testing with vitest. Any update on a fix for this?
+1
+1
I'm seeing the same error with cypress component tests
After some testing, it appears that import order matters. vue
MUST be imported before anything else. In the linked code, if you open src/main.ts
and move the following line to the top of the file, it starts working:
import { createApp } from 'vue';
Same fix works for cypress component testing, adding import 'vue'
to the top of test/cypress/support/component.js
gets the tests working again.
After some testing, it appears that import order matters.
vue
MUST be imported before anything else. In the linked code, if you opensrc/main.ts
and move the following line to the top of the file, it starts working:import { createApp } from 'vue';
Same fix works for cypress component testing, adding
import 'vue'
to the top oftest/cypress/support/component.js
gets the tests working again.
Can confirm adding import 'vue' to the top of test/cypress/support/component.js
makes all my tests work again. Must be some weird import ordering behaviour indeed. Would be great to fix this if possible.
After some testing, it appears that import order matters.
vue
MUST be imported before anything else. In the linked code, if you opensrc/main.ts
and move the following line to the top of the file, it starts working:import { createApp } from 'vue';
Same fix works for cypress component testing, adding
import 'vue'
to the top oftest/cypress/support/component.js
gets the tests working again.Can confirm adding import 'vue' to the top of
test/cypress/support/component.js
makes all my tests work again. Must be some weird import ordering behaviour indeed. Would be great to fix this if possible.
Import order was never an issue before. What changed? I would consider this a hack to fix the issue, when it should be reconciled by the transpiler and/or the plugins.
What happened?
Hello, using the quasar vite plugin v1.3.3 I am getting the following error when the ESM bundles are being created:
I have tried removing the split chunks plugin and going barebones. This seems to be an odd issue with Vite 4.x and Quasar. I can get the dev server to run by commenting out the quasar plugin, but that defeats the purpose of using it. I also had to remove this for Vitest to work correctly.
What did you expect to happen?
The Dev Server bootstraps correctly and starts without failure.
Reproduction URL
https://stackblitz.com/edit/quasarframework-jflmsk
How to reproduce?
Flavour
Vite Plugin (@quasar/vite-plugin)
Areas
Plugins (quasar)
Platforms/Browsers
Firefox, Chrome, Safari, Microsoft Edge, Electron
Quasar info output
Relevant log output
Additional context
This is also an issue with Vitest. Removing the plugin from the vite configuration allows the tests to run.
It seems this is the line in question that's failing: https://github.com/quasarframework/quasar/blob/665baf726be43b8385da2271db343cb944a5fb2c/ui/src/plugins/Platform.js#L16