You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vite-plugin-vanilla-extract in an application context in combination with a "third-party" library using web-components with LitElement throws the invalid exports error when the component loads its own styles from an separate file, named styles.css.ts which clashes with the .css.ts files from vanilla-extract.
[vite-plugin-vanilla-extract] Invalid exports.
You can only export plain objects, arrays, strings, numbers and null/undefined.
Creating a style file containing the styles for the web-component called styles.css.ts within the component library for the web-component in MyCustomElement.ts will produce the issue in the application.
Adding an additional option for the vanillaExtractPlugin which offers to set the file extension which is used for files which contains "vanilla-extract" content would most likely solve this issue.
Describe the bug
vite-plugin-vanilla-extract in an application context in combination with a "third-party" library using web-components with LitElement throws the
invalid exports
error when the component loads its own styles from an separate file, namedstyles.css.ts
which clashes with the.css.ts
files from vanilla-extract.Creating a style file containing the styles for the web-component called
styles.css.ts
within the component library for the web-component inMyCustomElement.ts
will produce the issue in the application.Adding an additional option for the vanillaExtractPlugin which offers to set the file extension which is used for files which contains "vanilla-extract" content would most likely solve this issue.
Reproduction
https://github.com/tkgroot/vanilla-extract-issue/tree/master
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: