@bennetthardwick/react-static-plugin-emotion
v8.0.2react-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!
npm i @bennetthardwick/react-static-plugin-emotion
Metadata
- MIT
- Whatever
- Tanner Linsley
- released 8/17/2021