Skip to content

Releases: HorusGoul/vite-plugin-stylex

[email protected]

04 Jul 10:32
677a735
Compare
Choose a tag to compare

Patch Changes

  • 00f28ca: Remove undefined values from rules array before passing to stylex babel plugin.

Thanks @lecstor!

[email protected]

28 Jun 12:18
c806b2c
Compare
Choose a tag to compare

Minor Changes

[email protected]

11 Jun 21:59
63ff3d1
Compare
Choose a tag to compare

Minor Changes

  • 7c43a01: Refactor Plugin to delegate more work to Vite itself

    • Use Vite's CSS pipeline for all CSS processing
    • Use Vite's waitForRequestsIdle experimental API to wait before generating the StyleX StyleSheet
    • Move to use renderChunk hook to generate the StyleX StyleSheet during builds.

    This change should make the plugin more robust and easier to maintain in the future.

    BREAKING CHANGES

    • The plugin now requires Vite 5.2.7 or higher
    • There's no more implicit CSS processing, you need to include the @stylex stylesheet; rule in a CSS file to generate the StyleX StyleSheet

    To migrate, add the @stylex stylesheet; rule to a CSS file in your project. Import that CSS file in your entrypoint.

    /* stylex.css */
    @stylex stylesheet;
    
    ...
    // main.ts
    import './stylex.css';
    
    ...

Patch Changes

  • ac1cf0e: Transform the stylesheet that includes the @stylex stylesheet; before the Vite CSS plugins

[email protected]

14 Apr 15:51
65ba91a
Compare
Choose a tag to compare

Patch Changes

  • 9a969ac: Fix alias path on Windows to be '@/' or '@src/' instead of '@\' or '@src\'. Thanks to @DarkAng3L for the PR!

[email protected]

29 Mar 14:18
77f5c50
Compare
Choose a tag to compare

Patch Changes

  • a5b5ae3: Fixes building projects that include assets and use LightningCSS. Fixes #60.

[email protected]

26 Mar 00:11
4431721
Compare
Choose a tag to compare

Patch Changes

  • 46c32cd: ?url import fix for Remix

[email protected]

22 Mar 01:53
fc8f1d2
Compare
Choose a tag to compare

Minor Changes

  • 41bc4f9: Apply Vite CSS processing and post-processing

    This enables minification and other optimizations for CSS files.

[email protected]

21 Mar 00:30
ac6b90d
Compare
Choose a tag to compare

Minor Changes

  • 36291b7: Add support for react-strict-dom. Fixes #50.

    importSources
    We're exposing the importSources option to allow you to configure alternative import sources for stylex, like react-strict-dom.

    By default, we include @stylexjs/stylex as import source. If you want to use css from react-strict-dom, you can configure it like this:

    import { defineConfig } from "vite";
    import styleX from "vite-plugin-stylex";
    
    export default defineConfig({
      plugins: [
        styleX({
          importSources: [{ from: "react-strict-dom", as: "css" }],
        }),
      ],
    });

    Also, if we detect that you're using react-strict-dom, we'll automatically add it to the list of libraries for you, so you don't have to worry about it.

    Deprecations:

    • stylexImports option is deprecated. Use importSources instead (you should be able to just replace stylexImports with importSources in your config).

[email protected]

16 Mar 23:54
db792c2
Compare
Choose a tag to compare

Minor Changes

  • 2f0f5af: Add libraries configuration option

Patch Changes

  • f44405a: Support Remix Vite plugin stable

[email protected]

23 Feb 00:53
42a514c
Compare
Choose a tag to compare

Patch Changes

  • 5c3523a: Make vite-plugin-stylex run in production mode only when the command is "build". Fixes #42.
  • 0dc6fb9: Resolve Vite aliases. Allow users to specify aliases through StyleX plugin options as well. Fixes #41.