react-static-plugin-emotion
v7.6.2
Published
A React-Static plugin that adds CSS-in-JS/SSR support for emotion & react-emotion
Downloads
112
Readme
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-emotion
Then 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
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!