@astrojs/preact
Advanced tools
Comparing version 0.1.2 to 0.1.3
# @astrojs/preact | ||
## 0.1.3 | ||
### Patch Changes | ||
- [#3455](https://github.com/withastro/astro/pull/3455) [`e9a77d86`](https://github.com/withastro/astro/commit/e9a77d861907adccfa75811f9aaa555f186d78f8) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Update client hydration to check for `ssr` attribute. Requires `astro@^1.0.0-beta.36`. | ||
## 0.1.2 | ||
@@ -4,0 +10,0 @@ |
import { h, render } from 'preact'; | ||
import StaticHtml from './static-html.js'; | ||
export default (element) => (Component, props, children) => | ||
export default (element) => (Component, props, children) => { | ||
if (!element.hasAttribute('ssr')) return; | ||
render( | ||
@@ -9,1 +10,2 @@ h(Component, props, children != null ? h(StaticHtml, { value: children }) : children), | ||
); | ||
}; |
{ | ||
"name": "@astrojs/preact", | ||
"description": "Use Preact components within Astro", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"type": "module", | ||
@@ -27,15 +27,10 @@ "types": "./dist/index.d.ts", | ||
}, | ||
"scripts": { | ||
"build": "astro-scripts build \"src/**/*.ts\" && tsc", | ||
"build:ci": "astro-scripts build \"src/**/*.ts\"", | ||
"dev": "astro-scripts dev \"src/**/*.ts\"" | ||
}, | ||
"dependencies": { | ||
"@babel/plugin-transform-react-jsx": "^7.17.3", | ||
"preact-render-to-string": "^5.1.21" | ||
"@babel/plugin-transform-react-jsx": "^7.17.12", | ||
"preact-render-to-string": "^5.2.0" | ||
}, | ||
"devDependencies": { | ||
"astro": "workspace:*", | ||
"astro-scripts": "workspace:*", | ||
"preact": "^10.7.1" | ||
"astro": "1.0.0-beta.38", | ||
"astro-scripts": "0.0.4", | ||
"preact": "^10.7.2" | ||
}, | ||
@@ -47,3 +42,8 @@ "peerDependencies": { | ||
"node": "^14.15.0 || >=16.0.0" | ||
}, | ||
"scripts": { | ||
"build": "astro-scripts build \"src/**/*.ts\" && tsc", | ||
"build:ci": "astro-scripts build \"src/**/*.ts\"", | ||
"dev": "astro-scripts dev \"src/**/*.ts\"" | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
167
0
14212