Open
Conversation
|
This works as intended for my purposes! |
unpunnyfuns
reviewed
Nov 16, 2021
| ...wrapLoader(require.resolve('style-loader'), styleLoaderOptions), | ||
| ...wrapLoader(require.resolve('css-loader'), { | ||
| ...cssLoaderOptions, | ||
| modules: true, |
There was a problem hiding this comment.
Would be nice if there was a way to configure the localIdentName, like so
[
{
name: "@storybook/addon-postcss",
options: {
postcssLoaderOptions: {
implementation: require("postcss"),
},
cssLoaderOptions: {
modules: {
localIdentName: "[path][name]__[local]",
},
},
},
},
]|
This works well in my case too, i have built your branch and used https://www.npmjs.com/package/patch-package to start using it, but would be good to have this merged |
|
Is there a reason this is not being merge, not being able to support css modules seems like a pretty big deal? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Resolves: #29
Description
Added additional rule that handles CSS modules when they have
.module.cssextension. The rule is mutually exclusive with.cssrule.Also using different lifecycle method -
webpackFinalinstead ofwebpack. Otherwise, a CSS rule is added implicitly by Storybook afterwards, causing it to parse CSS files twice, and in consequence it'd fail. This implementation replaces that rule.