Skip to content
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

Vanilla extractor styles are not being applied #5281

Closed
1 task done
Lucas-Eduardo-Goncalves opened this issue Jan 27, 2023 · 1 comment
Closed
1 task done

Vanilla extractor styles are not being applied #5281

Lucas-Eduardo-Goncalves opened this issue Jan 27, 2023 · 1 comment

Comments

@Lucas-Eduardo-Goncalves

What version of Remix are you using?

1.11.1

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

// Clone the repository
git clone git@github.com:Lucas-Eduardo-Goncalves/remix_template.git

// Install the packages
npm install or yarn

// Run the application
npm run dev or yarn dev

Expected Behavior

The application in the path ./app/models/notProtect/HomeModel/view should generate the styles for the tag <Div/>, which is in the route http://localhost:3000/.

Actual Behavior

The remix is ​​generating the class for the component but not generating the css.

image

image

image

(ps: This also happens when trying to use a globalStyle, but I managed to solve this error by putting the globalStyle function inside a file that exports some kind of style inside a variable)

@markdalgleish
Copy link
Member

Thanks for the bug report! This looks like the same issues as #5270. This is an issue with esbuild (evanw/esbuild#1370) which has been triggered by your use of export * in app/models/notProtect/index.ts. As a workaround you can use named re-exports instead:

-export * from "./HomeModel";
+export { HomeModel } from "./HomeModel";

I'm closing this as a duplicate, but you can follow further developments in #5270.

The other issue you mentioned about tree-shaking of globalStyle was fixed in #5246 which will be in the next Remix release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants