fix(docs): failed to install dependencies in StackBlitz (#4639)

This commit is contained in:
աӄա 2025-02-06 00:36:29 +08:00 committed by GitHub
parent ceb63854fc
commit 8f311828ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 4 deletions

View File

@ -177,9 +177,9 @@ export const useSandpack = ({
dependencies,
entry: entryFile,
devDependencies: {
autoprefixer: "^10.4.14",
postcss: "^8.4.21",
tailwindcss: "^3.2.7",
autoprefixer: "10.4.20",
postcss: "8.4.49",
tailwindcss: "3.4.17",
},
};

View File

@ -52,7 +52,18 @@ export function useStackblitz(props: UseSandpackProps) {
"dependencies": {
"react": "18.3.1",
"react-dom": "18.3.1",
${Object.entries(omit(dependencies as any, ["react", "react-dom"]))
${Object.entries(
omit(dependencies as any, [
"react",
"react-dom",
"react-dom/client",
"@vitejs/plugin-react",
"vite",
"autoprefixer",
"postcss",
"tailwindcss",
]),
)
.map(([key, value]) => `"${key}": "${value}"`)
.join(",\n ")}
},