Skip to content

Instantly share code, notes, and snippets.

@asaf
Last active September 20, 2019 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asaf/2f022d37eab7929908fea43b86572fa0 to your computer and use it in GitHub Desktop.
Save asaf/2f022d37eab7929908fea43b86572fa0 to your computer and use it in GitHub Desktop.
.PHONY: clean
clean:
rm -rf builds
ENTRYPOINTS := admin portal
EP = $(word 1, $@)
.PHONY: $(ENTRYPOINTS)
$(ENTRYPOINTS):
mkdir -p builds
sed -i '' -e 's/\("homepage": \)\(.*\)/\1"\/${EP}",/' package.json
cp src/${EP}.js src/index.js
yarn build
mv build builds/${EP}
@asaf
Copy link
Author

asaf commented Sep 20, 2019

How to use create-react-app for multiple endpoints without ejecting.

make clean admin portal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment