This repository was archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
create-react-app 2.1.2 has a breaking change for webpack config file location #18
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ const DEFAULT_VERSION = { | |
| patch: 4, | ||
| }; | ||
|
|
||
| exports.isEjected = fs.pathExistsSync(path.join(process.cwd(), 'config/webpack.config.dev.js')); | ||
| exports.isEjected = fs.pathExistsSync(path.join(process.cwd(), 'config/webpack.config.js')); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing here than above. |
||
|
|
||
| exports.getReactScriptsVersion = function getReactScriptsVersion(cliVersion) { | ||
| if (cliVersion) { | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm afraid it will be a bit more complicated than that. If we do that, we break the backward compatibility with
react-scriptsprevious version. You need to use thereact-scriptsversion that are available to you higher up:cra-build-watch/scripts/index.js
Line 13 in cd8ddd7
webpack.configfile path or your new version. To see an example of how it is used:cra-build-watch/scripts/index.js
Line 55 in cd8ddd7
We also need to check that the array indexes have not changed and remain the same in the second line of code I linked.