Minor Changes
-
#1614
4e92cce
Thanks @askoufis! - Add newinlineCssInDev
option tounstable_mode
configuration propertySetting
unstableMode: 'inlineCssInDev'
will result in all CSS generated by Vanilla Extract being inlined into astyle
element at the top of the documenthead
. This feature is useful for preventing FOUC (Flash of Unstyled Content) when server-rendering your initial HTML. Without this, callingssrLoadModule
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