-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuxtjs 3 + vanilla extract build error #413
Comments
This looks related to the following nuxt issue. nuxt/nuxt#11970 |
A workaround for this is transpiling import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'
import { defineNuxtConfig } from 'nuxt3'
export default defineNuxtConfig({
vite: {
plugins: [
vanillaExtractPlugin(),
]
},
build: {
transpile: ['@vanilla-extract', 'outdent', '@emotion']
}
}) Repo (part of my ssr issue, nuxt/nuxt#11827) |
I have a similar issue when I try to integrate |
@leithonenglish This error can be resolved by adding |
That works perfectly but now when I try to import any of the styles, for example, import { style } from "@vanilla-extract/css";
export const wrapperStyle = style({
background: `red`,
});
<script lang="ts" setup>
import { wrapperStyle } from "./app.css";
</script>
<template>
<div :class="wrapperStyle">Hey there</div>
</template> I get the following warning |
No updates on this? |
I think I'm facing the same issue with SvelteKit. Someone commented that Node does not like
|
Renaming the file to end with |
Okay, my error seems to be fixed by updating to Vite 4.0.3 released 5 hours ago, heh. I guess it was this one. Anyway, |
I just tested this and don't seem to get any errors. If nobody has anything to add here, I'd close this issue. |
Describe the bug
Nuxt 3 beta has been released and I was trying to use vanilla-extrat with it. I installed the vite plugin and added it to the
nuxt.config.ts
file. After runningyarn dev
I get this error:Let me know if there is any more information I can give you.
Link to reproduction
https://codesandbox.io/s/nuxt3-vanilla-extract-cpfce
System Info
Output of
npx envinfo --system --npmPackages @vanilla-extract/css,@vanilla-extract/webpack-plugin,@vanilla-extract/esbuild-plugin,@vanilla-extract/vite-plugin,@vanilla-extract/sprinkles,webpack,esbuild,vite --binaries --browsers
:The text was updated successfully, but these errors were encountered: