How to use the styled-jsx/server.default function in styled-jsx

To help you get started, we’ve selected a few styled-jsx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gatsbyjs / gatsby / packages / gatsby-plugin-styled-jsx / gatsby-ssr.js View on Github external
exports.onRenderBody = ({setHeadComponents}, pluginOptions) => {
  if (process.env.NODE_ENV === `production`) {
    const flush = require('styled-jsx/server').default
    const css = flush()
    setHeadComponents([css])
  }
}

styled-jsx

Full CSS support for JSX without compromises

MIT
Latest version published 6 months ago

Package Health Score

83 / 100
Full package analysis