Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@astrojs/preact

Package Overview
Dependencies
Maintainers
3
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astrojs/preact - npm Package Compare versions

Comparing version 0.0.0-10745-20240410180016 to 0.0.0-actions-20240503212851

7

dist/index.d.ts
import { type PreactPluginOptions as VitePreactPluginOptions } from '@preact/preset-vite';
import type { AstroIntegration } from 'astro';
export type Options = Pick<VitePreactPluginOptions, 'include' | 'exclude'> & {
export interface Options extends Pick<VitePreactPluginOptions, 'include' | 'exclude'> {
compat?: boolean;
};
export default function ({ include, exclude, compat }?: Options): AstroIntegration;
devtools?: boolean;
}
export default function ({ include, exclude, compat, devtools }?: Options): AstroIntegration;

@@ -11,7 +11,7 @@ import { fileURLToPath } from "node:url";

}
function src_default({ include, exclude, compat } = {}) {
function src_default({ include, exclude, compat, devtools } = {}) {
return {
name: "@astrojs/preact",
hooks: {
"astro:config:setup": ({ addRenderer, updateConfig, command }) => {
"astro:config:setup": ({ addRenderer, updateConfig, command, injectScript }) => {
const preactPlugin = preact({

@@ -49,2 +49,5 @@ reactAliasesEnabled: compat ?? false,

});
if (command === "dev" && devtools) {
injectScript("page", 'import "preact/debug";');
}
}

@@ -51,0 +54,0 @@ }

{
"name": "@astrojs/preact",
"description": "Use Preact components within Astro",
"version": "0.0.0-10745-20240410180016",
"version": "0.0.0-actions-20240503212851",
"type": "module",

@@ -33,6 +33,6 @@ "types": "./dist/index.d.ts",

"dependencies": {
"@babel/plugin-transform-react-jsx": "^7.22.5",
"@babel/plugin-transform-react-jsx": "^7.23.4",
"@babel/plugin-transform-react-jsx-development": "^7.22.5",
"@preact/preset-vite": "^2.7.0",
"@preact/signals": "^1.2.1",
"@preact/preset-vite": "^2.8.2",
"@preact/signals": "^1.2.3",
"babel-plugin-transform-hook-names": "^1.0.2",

@@ -43,4 +43,4 @@ "preact-render-to-string": "~6.3.1",

"devDependencies": {
"preact": "^10.19.2",
"astro": "0.0.0-10745-20240410180016",
"preact": "^10.20.2",
"astro": "0.0.0-actions-20240503212851",
"astro-scripts": "0.0.14"

@@ -47,0 +47,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc