forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
29 lines (27 loc) · 777 Bytes
/
main.js
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
const appConfig = require("../webpack.config");
module.exports = {
core: {
builder: "webpack5",
},
stories: [
"../frontend/**/*.stories.mdx",
"../frontend/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: ["@storybook/addon-essentials", "@storybook/addon-links"],
webpackFinal: storybookConfig => ({
...storybookConfig,
module: {
...storybookConfig.module,
rules: [
...storybookConfig.module.rules.filter(rule => !isCSSRule(rule)),
...appConfig.module.rules.filter(rule => isCSSRule(rule)),
],
},
resolve: {
...storybookConfig.resolve,
alias: appConfig.resolve.alias,
extensions: appConfig.resolve.extensions,
},
}),
};
const isCSSRule = rule => rule.test.toString() === "/\\.css$/";