github vanilla-extract-css/vanilla-extract @vanilla-extract/vite-plugin@5.1.0

latest releases: @vanilla-extract/rollup-plugin@1.4.1, @vanilla-extract/compiler@0.3.1, @vanilla-extract/vite-plugin@5.1.1...
2 months ago

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

  • Updated dependencies [4e92cce]:
    • @vanilla-extract/compiler@0.3.0

Don't miss a new vanilla-extract release

NewReleases is sending notifications on new releases.