preset.mjs 994 B

1234567
  1. import { logger, colors } from '@storybook/node-logger';
  2. var p=t=>t.test instanceof RegExp&&(t.test.test("test.css")||t.test.test("test.scss")||t.test.test("test.less"));function l(t,{rules:o,plugins:e}={}){if(logger.info(`=> [${colors.pink.bold("@storybook/addon-styling")}] Applying custom Storybook webpack configuration styling.`),e&&e.length&&(logger.info(`=> [${colors.pink.bold("@storybook/addon-styling")}] Adding given plugins to Storybook webpack configuration.`),t.plugins=t.plugins||[],t.plugins.push(...e)),o&&o.length){if(logger.info(`=> [${colors.pink.bold("@storybook/addon-styling")}] Replacing Storybook's webpack rules for styles with given rules.`),!t.module?.rules)throw new Error("webpackFinal received a rules option but config.module.rules is not an array");t.module.rules=t.module.rules.filter(i=>typeof i=="object"&&!p(i)),t.module.rules?.push(...o);}return t}var b=l;
  3. export { b as webpackFinal };
  4. //# sourceMappingURL=out.js.map
  5. //# sourceMappingURL=preset.mjs.map