stylex icon indicating copy to clipboard operation
stylex copied to clipboard

Document the requirement for a CSS file in a Next.js Project

Open cogell opened this issue 2 months ago • 1 comments

Describe the issue

If you have a vanilla nextjs app setup WITHOUT import './anything.css' then the stylex CSS will not be created (tho the className strings will).

As soon as you make a blank anything.css file and import it in app/layout.tsx the stylex CSS will start working.

Expected behavior

Ideally, stylex would work without the need to have a .css file imported somewhere in your app.

Steps to reproduce

reproduction https://stackblitz.com/edit/stylex-next-poaqpu?file=app%2Flayout.tsx forked from the StyleX + Next stackblitz that is linked on https://stylexjs.com/playground/

Test case

No response

Additional comments

No response

cogell avatar Apr 19 '24 18:04 cogell