A React-Static plugin that adds CSS-in-JS/SSR support for emotion & react-emotion
In an existing react-static site run:
$ yarn add react-static-plugin-emotion
Then add the plugin to your static.config.js
:
export default {
plugins: ["react-static-plugin-emotion"]
};
- Uses the
tapHtml
API to runemotion-server
'srenderStylesToString
function on the resulting HTML generated by react-static. This critically inlines any needed css for the exported page right into the html string. Sweet!