storybookjs / addon-postcss

This Storybook addon can be used to run the PostCSS preprocessor against your stories.
MIT License
20 stars 22 forks source link

[Bug]-ish including addon created empty object in config.module.rules #31

Open Jackbennett opened 2 years ago

Jackbennett commented 2 years ago

Describe the bug

adding "@storybook/addon-postcss",

To addons in .storybook/main.js

module.exports = {
  addons: [
    "@storybook/addon-essentials",
    "@storybook/addon-links",

  ],

Created an empty object in config.module.rules

My config has const fileLoaderRule = config.module.rules.find((r) => r.test.test(".svg")); to edit something unrelated, but adding an empty object made it explode.

Expected behaviour

Maybe don't add an empty object to config.module.rules

Environment

Additional context

just console.log the config.module.rules array with and without the addon.