Skip to content

How to extract StyleX CSS for Expo web? #34

@necolas

Description

@necolas

Describe the feature request

The RSD example app uses Expo to target Android, iOS, and Web but does not support extracting styles to an external CSS file for web. For the purposes of the demo, we use Babel to process the styles on web but currently have to leave the runtime injection functions in the bundle.

The next step for improving Expo Web performance with StyleX would be to have a proper Metro integration that automatically extracts CSS and inserts the relevant <link> tag in the app shell. This could also help Expo become one of the easiest ways for React developers to replicate Meta's production setup on web, as other frameworks currently require developers to manually integrate and configure the relevant StyleX bundler plugin rather than working out-of-the-box.

(Opinionated authoring experiences, like Tailwind syntax for web and native, could then also be built on top of StyleX to avoid the need for Tailwind tooling and provide the robust style-merging mechanics of StyleX)

cc @EvanBacon @nmn

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: expoA bug that originates in ExpodocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions