-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Update comment for adding new loaders in webpack #1499
Update comment for adding new loaders in webpack #1499
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
||
This package includes scripts and configuration used by [Create React App](https://github.com/facebookincubator/create-react-app). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably didn't mean to include this change.
@@ -1,14 +1,14 @@ | |||
{ | |||
"name": "react-scripts", | |||
"name": "react-scripts-cssmodules", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this too.
// E.g., when adding a loader for a new supported file extension, | ||
// we need to add the supported extension to this loader too. | ||
// Add one new line in `exclude` for each loader. | ||
// E.g., when adding a loader for a new supported file extension (such as .sass), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's say "For example" rather than "E.g.", as it's not a very good way to start a sentence.
@@ -172,7 +173,7 @@ module.exports = { | |||
// in the main CSS file. | |||
{ | |||
test: /\.css$/, | |||
loader: ExtractTextPlugin.extract('style', 'css?importLoaders=1!postcss') | |||
loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=1!postcss') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want this change.
@@ -163,7 +164,7 @@ module.exports = { | |||
// in development "style" loader enables hot editing of CSS. | |||
{ | |||
test: /\.css$/, | |||
loader: 'style!css?importLoaders=1!postcss' | |||
loader: 'style!css?modules&importLoaders=1!postcss' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also something we don't intend to enable.
This is going to be easier just to delete and restart. Sorry about that. |
As per issue #1208 this PR updates the comments explaining that after ejecting and trying to add new loaders, the user must also add add the extension that loader is handling to the exclude list for the
url loader
.I have made the original comment stand out more, and given a more practical example and have added a new comment to the edit of the
loaders
array where a person would usually add a new loader to warn them to update the exclude list.Happy to hear feedback if this is over the top / not obvious enough.