@astrojs/solid-js
Advanced tools
Comparing version 1.1.1 to 1.2.0
# @astrojs/solid-js | ||
## 1.2.0 | ||
### Minor Changes | ||
- [#5059](https://github.com/withastro/astro/pull/5059) [`f7fcdfe62`](https://github.com/withastro/astro/commit/f7fcdfe6210b3cf08cad92c49b64adf169b9e744) Thanks [@bluwy](https://github.com/bluwy)! - Auto ssr.noExternal solidjs dependencies | ||
## 1.1.1 | ||
@@ -4,0 +10,0 @@ |
@@ -0,1 +1,2 @@ | ||
import { getSolidDeps } from "./dependencies.js"; | ||
function getRenderer() { | ||
@@ -18,3 +19,3 @@ return { | ||
} | ||
function getViteConfiguration(isDev) { | ||
function getViteConfiguration(isDev, root) { | ||
const nestedDeps = ["solid-js", "solid-js/web", "solid-js/store", "solid-js/html", "solid-js/h"]; | ||
@@ -35,3 +36,3 @@ return { | ||
target: "node", | ||
noExternal: ["solid-js"] | ||
noExternal: ["solid-js", ...getSolidDeps(root)] | ||
} | ||
@@ -44,5 +45,5 @@ }; | ||
hooks: { | ||
"astro:config:setup": ({ command, addRenderer, updateConfig }) => { | ||
"astro:config:setup": ({ command, addRenderer, updateConfig, config }) => { | ||
addRenderer(getRenderer()); | ||
updateConfig({ vite: getViteConfiguration(command === "dev") }); | ||
updateConfig({ vite: getViteConfiguration(command === "dev", config.root) }); | ||
} | ||
@@ -49,0 +50,0 @@ } |
{ | ||
"name": "@astrojs/solid-js", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Use Solid components within Astro", | ||
@@ -33,3 +33,3 @@ "type": "module", | ||
"devDependencies": { | ||
"astro": "1.4.5", | ||
"astro": "1.5.0", | ||
"astro-scripts": "0.0.8", | ||
@@ -36,0 +36,0 @@ "solid-js": "^1.5.1" |
import type { AstroIntegration, AstroRenderer } from 'astro'; | ||
import { getSolidDeps } from './dependencies.js'; | ||
@@ -26,3 +27,3 @@ function getRenderer(): AstroRenderer { | ||
function getViteConfiguration(isDev: boolean) { | ||
function getViteConfiguration(isDev: boolean, root: URL) { | ||
// https://github.com/solidjs/vite-plugin-solid | ||
@@ -49,3 +50,3 @@ // We inject the dev mode only if the user explicitely wants it or if we are in dev (serve) mode | ||
target: 'node', | ||
noExternal: ['solid-js'], | ||
noExternal: ['solid-js', ...getSolidDeps(root)], | ||
}, | ||
@@ -59,5 +60,5 @@ }; | ||
hooks: { | ||
'astro:config:setup': ({ command, addRenderer, updateConfig }) => { | ||
'astro:config:setup': ({ command, addRenderer, updateConfig, config }) => { | ||
addRenderer(getRenderer()); | ||
updateConfig({ vite: getViteConfiguration(command === 'dev') }); | ||
updateConfig({ vite: getViteConfiguration(command === 'dev', config.root) }); | ||
}, | ||
@@ -64,0 +65,0 @@ }, |
Sorry, the diff of this file is not supported yet
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
29460
24
488
2