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

Choose between depending on loaders or making peerDeps #4

Closed phated closed 3 years ago

phated commented 3 years ago

Currently, this module depends directly on style-loader, css-loader, and postcss-loader. This is mostly to match the dependency structure in @storybook/core so people can swap them out—we even use the same versions.

However, the @storybook/preset-scss module has a peerDep on the loaders. It feels more "correct" to have a peerDep on these instead of directly depending upon them, but we should decide which is better for consumers.

phated commented 3 years ago

The decision was to depend directly on loaders to make this easy to use. Since this is versioned separately from storybook itself, we can just keep those dependencies updated as we see fit.

I'll also be removing the webpack peerDep, since that is managed by storybook core.