Replies: 1 comment 1 reply
-
Vitest does not support transformations in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a dependency which is provided as a CJS module, it uses
vue-material-design-icons
which provides.vue
files.So the dependency contains something like
... require('vue-material-design-icons/foo.vue')
.That dependency is not transformed, resulting in following error in test:
(This happens because the SFC is parsed as JS)
Building the project with vite works, only vitest fails.
An example could be: https://stackblitz.com/edit/vitejs-vite-emesyb?file=vite.config.js
I think I tried everything:
deps.web.transformGlobPattern = [/vue-material-design-icons/, /mydependency/]
deps.optimizer.web.enabled = false
deps.optimizer.web.include = ['mydependency']
deps.web.transformCss
to silence the error it again fails with "SyntaxError: Unexpected token '<'"Beta Was this translation helpful? Give feedback.
All reactions