Reproduction
- Sources migration
I've got a @quasar/app-vite v1's project that I have migrated to @quasar/app-vite v2 (v2.0.9). I followed Quasar Framework's migration guide: https://quasar.dev/quasar-cli-vite/upgrade-guide
I have followed the part with quasar/wrappers, especially fot boot files:
We have deprecated all the imports coming from quasar/wrappers. You can still use them, but we highly recommend switching to the new #q-app/wrappers, as shown below:
Hence my import { boot } from 'quasar/wrappers' have become import { defineBoot } from '#q-app/wrappers'
- Tests migration
This project uses Vitest 2 for its unit testing. I have migrating tests using @quasar/testing-unit-vitest.
I have followed the evolutions you mention there: https://testing.quasar.dev/packages/unit-vitest/
I have encountered the #393 issue, that I have solved with the workaround I mentionned in it.
Expectations
Tests involving components should pass
Reality
Corresponding tests failed with the following error message: TypeError: defineBoot is not a function
Notes
-
Sorry for the lack of details but I cannot give you more of them.
-
Here is a workaround for it that works:
Replacing all the imports from '#q-app/wrappers' by imports from '@quasar/app-vite/wrappers'.
Example with boot files:
import { defineBoot } from '#q-app/wrappers' // KO
import { defineBoot } from '@quasar/app-vite/wrappers' // OK
Recommended Quasar's '#q-app/wrappers' should work, shouldn't they?
Reproduction
I've got a @quasar/app-vite v1's project that I have migrated to @quasar/app-vite v2 (v2.0.9). I followed Quasar Framework's migration guide: https://quasar.dev/quasar-cli-vite/upgrade-guide
I have followed the part with quasar/wrappers, especially fot boot files:
Hence my
import { boot } from 'quasar/wrappers'have becomeimport { defineBoot } from '#q-app/wrappers'This project uses Vitest 2 for its unit testing. I have migrating tests using @quasar/testing-unit-vitest.
I have followed the evolutions you mention there: https://testing.quasar.dev/packages/unit-vitest/
I have encountered the #393 issue, that I have solved with the workaround I mentionned in it.
Expectations
Tests involving components should pass
Reality
Corresponding tests failed with the following error message:
TypeError: defineBoot is not a functionNotes
Sorry for the lack of details but I cannot give you more of them.
Here is a workaround for it that works:
Replacing all the imports
from '#q-app/wrappers'by importsfrom '@quasar/app-vite/wrappers'.Example with boot files:
Recommended Quasar's
'#q-app/wrappers'should work, shouldn't they?