From 3a2b88b3077efb4f4cde14e706f0673471d7ad97 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Wed, 5 May 2021 14:02:14 +0200 Subject: [PATCH] demo serving storybook static build with serve (#24812) Unfortunately I couldn't push up changes for that branch as maintainers access was disabled. Closes #18775 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes --- examples/with-storybook/.gitignore | 2 +- examples/with-storybook/package.json | 6 ++++-- examples/with-storybook/public/serve.json | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 examples/with-storybook/public/serve.json diff --git a/examples/with-storybook/.gitignore b/examples/with-storybook/.gitignore index a423604f97..5f31e17fdd 100644 --- a/examples/with-storybook/.gitignore +++ b/examples/with-storybook/.gitignore @@ -34,4 +34,4 @@ yarn-error.log* .vercel # Storybook -/storybook-static \ No newline at end of file +/storybook-static diff --git a/examples/with-storybook/package.json b/examples/with-storybook/package.json index 3b151db4e3..2e6727d545 100644 --- a/examples/with-storybook/package.json +++ b/examples/with-storybook/package.json @@ -7,7 +7,8 @@ "build": "next build", "start": "next start", "storybook": "start-storybook -p 6006", - "build-storybook": "build-storybook" + "build-storybook": "build-storybook -s public/", + "serve-storybook": "serve storybook-static" }, "dependencies": { "next": "latest", @@ -19,6 +20,7 @@ "@storybook/addon-essentials": "6.0.26", "@storybook/addon-links": "6.0.26", "@storybook/react": "6.0.26", - "babel-loader": "^8.0.5" + "babel-loader": "^8.0.5", + "serve": "11.3.2" } } diff --git a/examples/with-storybook/public/serve.json b/examples/with-storybook/public/serve.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/examples/with-storybook/public/serve.json @@ -0,0 +1 @@ +{}