@astrojs/react
Advanced tools
Comparing version 0.0.0-container-20240524151016 to 0.0.0-container-20240524153820
@@ -6,23 +6,3 @@ import { type Options as ViteReactPluginOptions } from '@vitejs/plugin-react'; | ||
}; | ||
declare const versionsConfig: { | ||
17: { | ||
server: string; | ||
client: string; | ||
externals: string[]; | ||
}; | ||
18: { | ||
server: string; | ||
client: string; | ||
externals: string[]; | ||
}; | ||
19: { | ||
server: string; | ||
client: string; | ||
externals: string[]; | ||
}; | ||
}; | ||
type SupportedReactVersion = keyof typeof versionsConfig; | ||
type ReactVersionConfig = (typeof versionsConfig)[SupportedReactVersion]; | ||
export declare function getContainerRenderer(reactVersion: ReactVersionConfig): ContainerRenderer; | ||
export declare function getContainerRenderer(): ContainerRenderer; | ||
export default function ({ include, exclude, babel, experimentalReactChildren, }?: ReactIntegrationOptions): AstroIntegration; | ||
export {}; |
@@ -38,6 +38,11 @@ import react, {} from "@vitejs/plugin-react"; | ||
} | ||
function getContainerRenderer(reactVersion) { | ||
function getContainerRenderer() { | ||
const majorVersion = getReactMajorVersion(); | ||
if (isUnsupportedVersion(majorVersion)) { | ||
throw new Error(`Unsupported React version: ${majorVersion}.`); | ||
} | ||
const versionConfig = versionsConfig[majorVersion]; | ||
return { | ||
name: "@astrojs/react", | ||
serverEntrypoint: reactVersion.server | ||
serverEntrypoint: versionConfig.server | ||
}; | ||
@@ -44,0 +49,0 @@ } |
{ | ||
"name": "@astrojs/react", | ||
"description": "Use React components within Astro", | ||
"version": "0.0.0-container-20240524151016", | ||
"version": "0.0.0-container-20240524153820", | ||
"type": "module", | ||
@@ -54,3 +54,3 @@ "types": "./dist/index.d.ts", | ||
"vite": "^5.2.11", | ||
"astro": "0.0.0-container-20240524151016", | ||
"astro": "0.0.0-container-20240524153820", | ||
"astro-scripts": "0.0.14" | ||
@@ -57,0 +57,0 @@ }, |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
30326
707