Skip to content

Conversation

@MartijnCuppens
Copy link
Member

Throw a warning if RFS is imported more than once.

@MartijnCuppens MartijnCuppens merged commit 33aa7fa into master Dec 6, 2018
@MartijnCuppens MartijnCuppens deleted the warn-if-imported-more-than-once branch December 6, 2018 21:38
@lucagouty
Copy link

lucagouty commented Feb 11, 2019

hello @MartijnCuppens 😃

I'm a bit confused about this warning, as it's imported from bootstrap/scss/_mixins.scss :
https://github.com/twbs/bootstrap/blob/1ded0d6a4eefb7daca62c44e4e735aec200f0b6f/scss/_mixins.scss#L5-L6

Before that, bootstrap never warned about including ~boostrap/scss/mixins multiple times, but now it does.

If everyone think it's really bad to import mixins multiple times, then I think we should do it in bootstrap/scss/mixins but not only for rfs, what do you think ?

But to be honest, I'm not sure it's necessary, especially for mixins. If we want to add that kind of warning, we should do it in places that "generate" css (to avoid having same rules defined multiple times), it makes more sense. But for now bootstrap don't warn for this, so having it for some mixins seems weird IMO.

PS : Anyway, thank you because it made me realise I was badly importing things on my apps, and now I'm not having the warning anymore, so it's all good for me 😉

@MartijnCuppens
Copy link
Member Author

Hi @lucagouty,

That might be a good idea, can you make an issue on the Bootstrap repo about this, since that is a separate project and we'll need to have a look where we can add that.

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.

3 participants