Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add module.parser.css.namedExports #7274

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

snitin315
Copy link
Member

Fix #7222

Copy link

vercel bot commented Jun 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
webpack-js-org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2024 9:44am

};
```

When `namedExports` is `false` (default behavior) for CSS modules, you can retrieve CSS classes using various import methods.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For webpack default behavior is named export, so let's rewrite it

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One note, thank you for your PR

```js
import * as styles from './styles.css';
import styles1 from './styles.css';
import { foo } from './styles.css';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use styles.modules.css because it is recommended named convention

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@snitin315 snitin315 merged commit 6a86e2d into main Jun 7, 2024
8 checks passed
@snitin315 snitin315 deleted the docs-module.parser.css.namedExports branch June 7, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document webpack change: feat(css): allow to use default and named export
2 participants