forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multiple entry points from src/entries/*
Based on facebook@fd9952c Other changes: 1. Allow customizing the path to node_modules using ENV var 2. Added instructions for updating this fork 3. Attempt to minimize MaterialUI bundle size 4. Fix "path is undefined" error in webpackDevServer 5. Support multiple entrypoints in ManifestPlugin output
- Loading branch information
Showing
9 changed files
with
153 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Instructions for Updating this Fork | ||
|
||
[Based on this article](https://medium.com/@denis.zhbankov/maintaining-a-fork-of-create-react-app-as-an-alternative-to-ejecting-c555e8eb2b63) | ||
|
||
```sh | ||
# Indicate the version we're on now, and which one we're upgrading to: | ||
VERSION_FROM="3.3.1" | ||
VERSION_TO="3.4.4" | ||
|
||
# In Github, first sync our fork with the parent facebook/create-react-app repository | ||
|
||
# Clone down our fork if you haven't already | ||
git clone [email protected]:LeadSimple/create-react-app.git | ||
# Might not be necessary: | ||
git remote add upstream [email protected]/facebook/create-react-app.git | ||
|
||
# Pull upstream changes into main (master) branch | ||
git checkout main | ||
git pull upstream main | ||
|
||
# Check out the last custom branch we updated (ex custom-react-scripts-3.1.1) | ||
git checkout custom-react-scripts-$VERSION_FROM | ||
# Create a new branch from it | ||
git checkout -b custom-react-scripts-$VERSION_TO | ||
|
||
# Rebase our custom branch onto the desired tag from the main branch | ||
# During the rebase, edit packages/react-scripts/package.json to have an rc version, like 3.3.1-rc.1 | ||
git rebase --onto v$VERSION_TO main | ||
|
||
# TODO: find out how to test the package at this point, before publishing rc to NPM | ||
|
||
# Publish package to NPM | ||
cd packages/react-scripts | ||
npm publish --access public | ||
|
||
# Update package.json in main app, and test locally | ||
# Once we confirm everything is working, we could update this package's version to drop the -rc.1, but that isn't really necessary | ||
|
||
# If something is not working: | ||
# 1. Debug and fix, updating the package version to a new rc. | ||
# 2. Commit and tag | ||
# 3. Publish to NPM | ||
# 4. Test again | ||
|
||
# Tag our local branch with the new version | ||
git tag -a v$VERSION_TO-rc1 -m "Customized v$VERSION_TO" | ||
|
||
# IMPORTANT: Make sure everything is working first, then: | ||
# Push our rebased branch up to Github | ||
cd ../.. | ||
git status | ||
git push origin | ||
``` |
6 changes: 3 additions & 3 deletions
6
packages/cra-template/template/src/index.js → ...ra-template/template/src/entries/index.js
This file contains 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 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 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 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 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 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 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