Skip to content

Commit 167522e

Browse files
authored
fix: fix storybook when using coder desktop (#19364)
1 parent 362c78a commit 167522e

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

site/.storybook/main.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

site/.storybook/main.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
export default {
2+
stories: ["../src/**/*.stories.tsx"],
3+
4+
addons: [
5+
"@chromatic-com/storybook",
6+
"@storybook/addon-docs",
7+
"@storybook/addon-links",
8+
"@storybook/addon-themes",
9+
"storybook-addon-remix-react-router",
10+
],
11+
12+
staticDirs: ["../static"],
13+
14+
framework: {
15+
name: "@storybook/react-vite",
16+
options: {},
17+
},
18+
19+
async viteFinal(config) {
20+
// Storybook seems to strip this setting out of our Vite config. We need to
21+
// put it back in order to be able to access Storybook with Coder Desktop or
22+
// port sharing.
23+
config.server = {
24+
...config.server,
25+
allowedHosts: [".coder", ".dev.coder.com"],
26+
};
27+
return config;
28+
},
29+
} satisfies import("@storybook/react-vite").StorybookConfig;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy