Open
Description
Description
Apologies for not providing a complete repro, since I'm only currently evaluating the library. But I tried it out mimicking some of the behavior from your Vue example. This, however, makes all the Vitest unit tests in the project to fail with the following message.
TypeError: Cannot read properties of undefined (reading 'defineComponent')
β― node_modules/@fireworks-js/vue/dist/index.umd.js:8:318
β― node_modules/@fireworks-js/vue/dist/index.umd.js:8:235
β― node_modules/@fireworks-js/vue/dist/index.umd.js:8:273
I can get around this by mocking the import of @fireworks-js/vue in my test setups, but is it possible to avoid this?
My code (partial):
import {Fireworks, type FireworksOptions} from '@fireworks-js/vue';
const fireworksOptions: Partial<FireworksOptions> = {
acceleration: 1,
};
<Fireworks
:autostart="fireworks"
:options="fireworksOptions"
class="modal-dialog__backdrop"
aria-hidden="true"
/>
My deps:
"@fireworks-js/vue": "^2.10.8",
"vue": "3.5.12",
"vite": "^5.4.9",
"vitest": "^2.1.3",
Which package are you using?
@fireworks-js/vue
fireworks-js version
2.10.8
Browser
Firefox 131