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

Allow multiple anonymous imports if className is only in one of them. #186

Conversation

ratbeard
Copy link

From the current readme:

When a file imports multiple stylesheets, you must use a named reference.

Have suggestions for an alternative behaviour? Raise an issue with your suggestion.

This PR allows multiple anonymous css imports. It is only a problem if you use a styleName which is present in multiple anonymous imports, in which case an error is thrown:

2018-05-30 at 4 07 52 pm

Let me know what you think and I can update the tests and docs.

If the className is present in multiple anonymous imports throw an error
saying that you must use a named import for one of them.
@tsnieman
Copy link

Concept ACK. I like the added flexibility.

@gajus
Copy link
Owner

gajus commented May 30, 2018

Would be Okay with this if it is guarded by a setting.

Not a behaviour I would encourage otherwise.

Please add tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants