8.0.2 • Published 4 years ago
@bennetthardwick/react-static-plugin-emotion v8.0.2
react-static-plugin-emotion
A React-Static plugin that adds CSS-in-JS/SSR support for emotion & react-emotion
Installation
In an existing react-static site run:
$ yarn add react-static-plugin-emotionThen add the plugin to your static.config.js:
export default {
plugins: ["react-static-plugin-emotion"]
};What does this plugin do under the hood?
- Uses the
tapHtmlAPI to runemotion-server'srenderStylesToStringfunction on the resulting HTML generated by react-static. This critically inlines any needed css for the exported page right into the html string. Sweet!