2022-07-23 00:39:50 +00:00
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
module.exports = {
|
2022-11-04 15:40:46 +00:00
|
|
|
stories: [
|
|
|
|
"../intro.stories.mdx",
|
|
|
|
"../../../packages/ui/components/**/*.stories.mdx",
|
2022-12-14 13:36:10 +00:00
|
|
|
"../../../packages/features/**/*.stories.mdx",
|
2022-11-04 15:40:46 +00:00
|
|
|
"../../../packages/ui/components/**/*.stories.@(js|jsx|ts|tsx)",
|
|
|
|
],
|
2022-07-23 00:39:50 +00:00
|
|
|
addons: [
|
|
|
|
"@storybook/addon-links",
|
|
|
|
"@storybook/addon-essentials",
|
|
|
|
"@storybook/addon-interactions",
|
2023-01-17 12:38:14 +00:00
|
|
|
"storybook-addon-rtl-direction",
|
2022-11-04 15:40:46 +00:00
|
|
|
"storybook-react-i18next",
|
2023-01-18 11:54:03 +00:00
|
|
|
"storybook-addon-next",
|
|
|
|
/*{
|
2022-11-04 15:40:46 +00:00
|
|
|
name: "storybook-addon-next",
|
|
|
|
options: {
|
|
|
|
nextConfigPath: path.resolve(__dirname, "../../web/next.config.js"),
|
|
|
|
},
|
2023-01-18 11:54:03 +00:00
|
|
|
},*/
|
2022-07-23 00:39:50 +00:00
|
|
|
],
|
|
|
|
framework: "@storybook/react",
|
|
|
|
core: {
|
2022-07-26 14:05:11 +00:00
|
|
|
builder: "webpack5",
|
2022-07-23 00:39:50 +00:00
|
|
|
},
|
2022-11-04 15:40:46 +00:00
|
|
|
staticDirs: ["../public"],
|
|
|
|
webpackFinal: async (config, { configType }) => {
|
2022-07-23 00:39:50 +00:00
|
|
|
config.resolve.fallback = {
|
|
|
|
fs: false,
|
|
|
|
assert: false,
|
|
|
|
buffer: false,
|
|
|
|
console: false,
|
|
|
|
constants: false,
|
|
|
|
crypto: false,
|
|
|
|
domain: false,
|
|
|
|
events: false,
|
|
|
|
http: false,
|
|
|
|
https: false,
|
|
|
|
os: false,
|
|
|
|
path: false,
|
|
|
|
punycode: false,
|
|
|
|
process: false,
|
|
|
|
querystring: false,
|
|
|
|
stream: false,
|
|
|
|
string_decoder: false,
|
|
|
|
sys: false,
|
|
|
|
timers: false,
|
|
|
|
tty: false,
|
|
|
|
url: false,
|
|
|
|
util: false,
|
|
|
|
vm: false,
|
|
|
|
zlib: false,
|
|
|
|
};
|
2022-12-14 13:36:10 +00:00
|
|
|
|
|
|
|
config.module.rules.push({
|
|
|
|
test: /\.css$/,
|
|
|
|
use: [
|
|
|
|
"style-loader",
|
|
|
|
{
|
|
|
|
loader: "css-loader",
|
|
|
|
options: {
|
|
|
|
modules: true, // Enable modules to help you using className
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
include: path.resolve(__dirname, "../src"),
|
|
|
|
});
|
|
|
|
|
2022-07-23 00:39:50 +00:00
|
|
|
return config;
|
|
|
|
},
|
|
|
|
};
|