Skip to content

Instantly share code, notes, and snippets.

@JoelQ
Created Mar 21, 2019
Embed
What would you like to do?
Netlify + Parcel deployment
#!/bin/sh
set -e
echo "== BUILDING THE APP =="
yarn parcel build src/index.html
echo "== CONFIGURING REDIRECTS =="
if [ "$CONTEXT" = "production" ]; then
cp production_redirects dist/_redirects
else
cp staging_redirects dist/_redirects
fi
/graphql https://my-prod-server.url/graphql 200
/* /index.html 200
/graphql https://my-staging-server.url/graphql 200
/* /index.html 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment