UNPKG

@engie-group/fluid-design-system-react

Version:

Fluid Design System React

84 lines 3.4 kB
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; import * as path from 'node:path'; import { dirname, join } from 'path'; /** * This function is used to resolve the absolute path of a package. * It is needed in projects that use Yarn PnP or are set up within a monorepo. */ function getAbsolutePath(value) { return dirname(require.resolve(join(value, 'package.json'))); } const config = { stories: ['../src/**/*.mdx', './docs/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], addons: [ getAbsolutePath('@storybook/addon-webpack5-compiler-swc'), getAbsolutePath('@storybook/addon-links'), getAbsolutePath('@storybook/addon-essentials'), getAbsolutePath('@chromatic-com/storybook'), getAbsolutePath('@storybook/addon-interactions'), getAbsolutePath('storybook-dark-mode') ], staticDirs: ['./assets'], typescript: { check: false, reactDocgen: 'react-docgen-typescript', reactDocgenTypescriptOptions: { shouldRemoveUndefinedFromOptional: true, shouldExtractLiteralValuesFromEnum: true, propFilter: (prop) => { return prop.parent ? !/node_modules/.test(prop.parent.fileName) : true; } } }, docs: { defaultName: 'Documentation' }, framework: { name: getAbsolutePath('@storybook/react-webpack5'), options: {} }, webpackFinal: (config) => __awaiter(void 0, void 0, void 0, function* () { var _a, _b; (_b = (_a = config.module) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.push({ test: /\.s[ac]ss$/i, use: [ 'style-loader', { loader: 'css-loader', options: { importLoaders: 1, import: true, modules: { mode: 'local', auto: /^((?!reboot).)*$/i, exportGlobals: true, localIdentName: '[local]', exportLocalsConvention: 'asIs', exportOnlyLocals: false }, sourceMap: true } }, { loader: 'sass-loader', options: { sassOptions: { includePaths: [path.resolve(__dirname, '../node_modules')] } } } ] }); return config; }) }; export default config; //# sourceMappingURL=main.js.map