ssr-emotion-react 1.0.0-beta.0 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/astro-integration.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ In Astro, Island components (`client:*`) get the best of both worlds.
|
|
|
99
99
|
|
|
100
100
|
### Why this is powerful
|
|
101
101
|
|
|
102
|
-
Because the Emotion runtime remains active inside Islands, you can use standard React
|
|
102
|
+
Because the Emotion runtime remains active inside Islands, you can use standard React patterns to handle dynamic styles without any special APIs.
|
|
103
103
|
|
|
104
104
|
### Example: Hydration-aware Styling
|
|
105
105
|
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
|
-
import
|
|
2
|
+
import a from"@vitejs/plugin-react";function f(){return{name:"ssr-emotion-react",hooks:{"astro:config:setup":({addRenderer:t,updateConfig:r,injectScript:o,config:s,command:n})=>{t({name:"ssr-emotion-react",serverEntrypoint:"ssr-emotion-react/astro/render",clientEntrypoint:"ssr-emotion-react/astro/client"});let i=s.vite?.plugins?.some(e=>e&&(e.name==="vite:react-babel"||e.name==="vite:react-jsx"));n==="dev"&&o("before-hydration",`
|
|
3
|
+
window.$RefreshReg$ = window.$RefreshReg$ || (() => {});
|
|
4
|
+
window.$RefreshSig$ = window.$RefreshSig$ || (() => (type) => type);
|
|
5
|
+
`),r({vite:{plugins:i?[]:[a({fastRefresh:!1})],ssr:{external:["@emotion/css","@emotion/server"]}}})}}}}export{f as default};
|