lunar
lunar copied to clipboard
How to disable global styles or remove "!important" of style rule
Hi, I import some third party stylesheets. But some styles not work becase of lunar has inject some global styles with !important
Such as
If I force let globals
to be null in here. My app will work well
So is there any general way to fulfill my needs?
@yinxin630 Important comes from Aphrodite and cannot be changed.
Aphrodite has an option to override the automatic addition of !important
: https://github.com/Khan/aphrodite/pull/104
@BarthesSimpson While true, that functionality is abstracted away in Lunar so you wouldn't be able to control that.
In your webpack config, add this alias:
...
resolve: {
alias: {
aphrodite: 'aphrodite/no-important',
},
},
...