-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
41 lines (40 loc) · 1011 Bytes
/
main.ts
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
31
32
33
34
35
36
37
38
39
40
41
const path = require("path");
const toPath = (_path: string) => path.join(process.cwd(), _path);
module.exports = {
core: {
builder: "webpack5",
},
framework: "@storybook/react",
features: {
emotionAlias: false,
babelModeV7: true,
},
staticDirs: ["./public"],
stories: [
"../docs/**/*.stories.@(js|jsx|ts|tsx|mdx)",
"../src/**/*.stories.@(ts|tsx|mdx)",
],
addons: [
"@storybook/addon-docs",
"@storybook/addon-storysource",
"@storybook/addon-controls",
"@storybook/addon-actions",
"@storybook/addon-a11y",
"@storybook/addon-links",
"@storybook/addon-toolbars",
"@storybook/addon-viewport",
],
webpackFinal: async (config: any) => {
return {
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve.alias,
"@codemirror/state": toPath("node_modules/@codemirror/state"),
"@codemirror/view": toPath("node_modules/@codemirror/view"),
},
},
};
},
};