Closed idangozlan closed 7 years ago
@idangozlan Could you provide a minimal representation gist/repo?
Yes please
Ok, so I investigate this issue very deeply, debug it and found the issue.
When using react-css-themr and supplying as base stylesheet which is empty / has only :global rules, for ex:
...
import * as styles from './App.scss';
...
@themr('App', styles)
......
and App.scss is empty / only :global rules, extract-text-webpack-plugin
put in the webpack assets file "// removed by extract-text-webpack-plugin" instead of just empty json {}
.
when react-css-themr
is trying to merge the themed App.scss
and the base one, which after the extraction is string of "// removed by extract-text-webpack-plugin", it's screaming, since it can't merge it.
Finally, we can warn users to not include empty/global rules as base theme file, but I would like to prevent users fail with that tricky thing.
Anyway, I've created an exception if for that, and im going to create pull request. it's up to you guys if to get it or not, but I think it will be good idea.
Any special instructions to ExtractTextPlugin usage?