Syntax update for including style-loader#9632
Conversation
|
@mrmckeb I just remembered this one (#9076) and saw that it's sitting stale in the v4 Project Done kanban Is it correct procedure to open this PR? Happy to support however you advise, but don't want to get in the way if already handled 👍 |
|
I'm OK with this change - but keep in mind that as we don't officially expose that config today, we can't guarantee that this will always be there. @ianschmitz or @iansu, any thoughts? |
|
@ianschmitz + @iansu Quickly bumping this in case you think it will be useful. I was reminded to follow up after getting a notification that someone else would find this useful (stefangomez#1 (comment)) Thanks for considering! cc @mrmckeb |
|
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
|
This pull request has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. Thank you for your contribution! |
Cleaned up PR (original reference #9076, stale PR #9100 )
This simple syntax change will allow for other CRA extension utilities (like customize-cra) to add options to the 'style-loader'. Specifically the "insert" prop (fka "insertInto") can be quite useful.
E.g. https://github.com/arackaf/customize-cra/blob/master/api.md#adjuststyleloaderscallback
It's possible that preventing overrides to the 'style-loader' configuration was intentional as a way to prevent downstream webpack/hot-update bugs, but I haven't run into any when running this update in an ejected create-react-app. So would appreciate any veteran thoughts on whether this is safe to update.