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
The project should compile and the button should assume appropriate styling.
Actual Behavior
info building...
X [ERROR] Transform failed with 1 error:
<stdin>:14:8: ERROR: Expected ">" but found "{" [plugin css-side-effects-plugin]
app/routes/_index.tsx:20:23:
20 │ import { Button } from "../components/button";
╵ ~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onLoad" callback registered here:
node_modules/@remix-run/dev/dist/compiler/plugins/cssSideEffectImports.js:64:12:
64 │ build.onLoad({
╵ ~~~~~~
NOTE:
Vanilla-extract works as expected when imported into root.tsx:
This is not an issue with Remix, but you have a typo in your code.
Fix the error ERROR: Expected ">" but found "{" and it will work. I had the same issue and thought it is from the css bundler, but in reality the css bundler complains if you have typos in your code and misleads you.
I had a look into this and it turns out it's an issue with our HMR transform for .js files, not a Vanilla Extract issue. Looks like a fix for a different issue inadvertently fixed this problem too since we're now using the correct loader for .js files: #6762
I'm closing this as fixed. Just to confirm, can you check whether you're still experiencing this issue with the 1.19.0-pre.0 release? Updating to this pre-release fixes my local repro. Otherwise, if you're still having issues, let me know.
What version of Remix are you using?
1.18.1
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
app/components/button/index.js
with the following:app/components/button/styles.css.ts
with the following:Button
component withinroutes/_index.tsx
:Expected Behavior
The project should compile and the button should assume appropriate styling.
Actual Behavior
NOTE:
Vanilla-extract works as expected when imported into root.tsx:
root.css.ts
with the following:root.tsx
:On build, the background is red as expected.
The text was updated successfully, but these errors were encountered: