-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmain.ts
More file actions
30 lines (27 loc) · 772 Bytes
/
main.ts
File metadata and controls
30 lines (27 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import type { StorybookConfig } from "@storybook/react-vite";
import tailwindcss from "@tailwindcss/vite";
import { createApp } from "@neaps/api";
const API_PORT = 6007;
const config: StorybookConfig = {
stories: ["../src/**/*.stories.@(ts|tsx)"],
addons: ["@storybook/addon-themes"],
framework: {
name: "@storybook/react-vite",
options: {},
},
viteFinal(config) {
config.plugins ??= [];
config.plugins.push(tailwindcss());
config.plugins.push({
name: "neaps-api",
async configureServer() {
const app = createApp();
app.listen(API_PORT, "0.0.0.0", () => {
console.log(`Neaps API listening on http://0.0.0.0:${API_PORT}`);
});
},
});
return config;
},
};
export default config;