From 4f6b320a83b792d77c0161786ecede0a9374ef72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Slavi=C4=8D?= Date: Thu, 29 Dec 2022 11:40:27 +0100 Subject: [PATCH 1/2] Address PR feedback from #20390 --- code/frameworks/preact-vite/README.md | 5 ++--- code/frameworks/preact-vite/package.json | 15 ++++----------- code/frameworks/react-vite/package.json | 2 +- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/code/frameworks/preact-vite/README.md b/code/frameworks/preact-vite/README.md index 782e5e407e68..4a38f4b8c447 100644 --- a/code/frameworks/preact-vite/README.md +++ b/code/frameworks/preact-vite/README.md @@ -9,7 +9,7 @@ ### In a project without Storybook -Follow the prompts after running this command in your Next.js project's root directory: +Follow the prompts after running this command in your Preact project's root directory: ```bash npx storybook@next init @@ -40,8 +40,7 @@ Update your `main.js` to change the framework property: module.exports = { // ... framework: { - // name: '@storybook/react-webpack5', // Remove this - name: '@storybook/preact-vite', // Add this + name: '@storybook/preact-vite', // <- Change this options: {}, }, }; diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json index 0652eaa081d5..8da07b64e138 100644 --- a/code/frameworks/preact-vite/package.json +++ b/code/frameworks/preact-vite/package.json @@ -30,11 +30,7 @@ "import": "./dist/preset.mjs", "types": "./dist/preset.d.ts" }, - "./package.json": { - "require": "./package.json", - "import": "./package.json", - "types": "./package.json" - } + "./package.json": "./package.json" }, "main": "dist/index.js", "module": "dist/index.mjs", @@ -51,12 +47,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@preact/preset-vite": "^2.5.0", - "@rollup/pluginutils": "^4.2.0", + "@preact/preset-vite": "^2.0.0", "@storybook/builder-vite": "7.0.0-beta.16", - "@storybook/preact": "7.0.0-beta.16", - "ast-types": "^0.14.2", - "magic-string": "^0.26.1" + "@storybook/preact": "7.0.0-beta.16" }, "devDependencies": { "@types/node": "^16.0.0", @@ -68,7 +61,7 @@ "vite": "^3.0.0 || ^4.0.0" }, "engines": { - "node": "^14.18 || >=16" + "node": ">=16" }, "publishConfig": { "access": "public" diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index d9234a49d8cd..f0d0f3b9d919 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -68,7 +68,7 @@ "vite": "^3.0.0 || ^4.0.0" }, "engines": { - "node": "^14.18 || >=16" + "node": ">=16" }, "publishConfig": { "access": "public" From 7eb9a279618a490438780fd6f57302507690ed50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Slavi=C4=8D?= Date: Thu, 29 Dec 2022 11:41:04 +0100 Subject: [PATCH 2/2] Update yarn.lock --- code/yarn.lock | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index 03f0a8f7bec2..51c38ee6523d 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5193,7 +5193,7 @@ __metadata: languageName: node linkType: hard -"@preact/preset-vite@npm:^2.5.0": +"@preact/preset-vite@npm:^2.0.0": version: 2.5.0 resolution: "@preact/preset-vite@npm:2.5.0" dependencies: @@ -6891,13 +6891,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/preact-vite@workspace:frameworks/preact-vite" dependencies: - "@preact/preset-vite": ^2.5.0 - "@rollup/pluginutils": ^4.2.0 + "@preact/preset-vite": ^2.0.0 "@storybook/builder-vite": 7.0.0-beta.16 "@storybook/preact": 7.0.0-beta.16 "@types/node": ^16.0.0 - ast-types: ^0.14.2 - magic-string: ^0.26.1 typescript: ~4.9.3 vite: ^4.0.0 peerDependencies: