Skip to content

Instantly share code, notes, and snippets.

@GoodNovember
Created December 11, 2019 23:40
Show Gist options
  • Save GoodNovember/229557da0b7d29b00d1214e10ef2e57b to your computer and use it in GitHub Desktop.
Save GoodNovember/229557da0b7d29b00d1214e10ef2e57b to your computer and use it in GitHub Desktop.
Single Page Apps with ZEIT Now, Parcel and React

This is a nice Single Page App stack example config.

ingredients

  • now // easy peasy deploys
  • react // pleasurable coding
  • parcel-bundler //easy packaging.
{
"version":2,
"name":"whatever-name-you-want",
"builds":[
{
"src":"package.json",
"use":"@now/static-build",
"config": {
"distDir": "dist"
}
}
],
"rewrites":[
{
"source":"/(.*)",
"destination":"/index.html"
}
]
}
{
"name": "something-cool-i-guess",
"version": "1.0.0",
"scripts": {
"dev": "parcel src/index.html",
"build": "parcel build src/index.html",
"now-build": "npm run build"
},
"dependencies": {
"navi": "^0.13.6",
"parcel": "^1.12.4",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-navi": "^0.13.6",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment