Open christian-bromann opened 1 year ago
On the Vitest side, we are very interested in having this implemented. Importing @testing-library/vue
in Vite incorrectly imports UMD build of @vue/test-utils
because it uses the browser condition and bypasses the import
one - not sure if it's the bug in Vite or it's supposed to prioritise require
condition if require()
was used (like in this package).
I will try to prepare a PR when I have more time.
Describe the bug A clear and concise description of what the bug is.
This is less a bug as a feature request. It would be great if this package could export an ESM bundle. I am maintaining the WebdriverIO project and we are recommending this library for component testing in the browser. We have Vite transforming the CJS code into ESM but it fails doing that for Windows for whatever reasons.
I thought exporting an ESM version is a reasonable request and would make adopters life a bit easier.
Happy to take a stab at it.
To Reproduce Steps to reproduce the behavior:
Try to import this package within a ESM context.
Expected behavior
It should load.
Screenshots
Related information:
@testing-library/vue
version:Vue
version:node
version:npm
(oryarn
) version:Relevant code or config (if any)
Additional context