Skip to content

@vanilla-extract/[email protected]

Choose a tag to compare

@vanilla-extract-ci vanilla-extract-ci released this 30 Jun 04:39
· 8 commits to master since this release
c907c10

Minor Changes

  • #1614 4e92cce Thanks @askoufis! - Add new inlineCssInDev option to unstable_mode configuration property

    Setting unstableMode: 'inlineCssInDev' will result in all CSS generated by Vanilla Extract being inlined into a style element at the top of the document head. This feature is useful for preventing FOUC (Flash of Unstyled Content) when server-rendering your initial HTML. Without this, calling ssrLoadModule on your server entrypoint will not include the CSS in the HTML, leading to a FOUC when the client-side JavaScript takes over.

    Note that CSS will only be inlined in development mode. Production builds are unaffected by this setting.

    EXAMPLE USAGE:

    // vite.config.ts
    import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
    
    export default {
      plugins: [
        vanillaExtractPlugin({
          unstable_mode: 'inlineCssInDev'
        })
      ]
    };

Patch Changes