Skip to content

Instantly share code, notes, and snippets.

@drblue
Last active May 23, 2024 12:27
Show Gist options
  • Save drblue/78f807a1b612db3ce70e129daf4fc092 to your computer and use it in GitHub Desktop.
Save drblue/78f807a1b612db3ce70e129daf4fc092 to your computer and use it in GitHub Desktop.
Netlify Config for Vite React apps
# Netlify Config for Vite React apps
#
# See <https://docs.netlify.com/configure-builds/file-based-configuration/>
# for more info on configuring this file.
[build]
command = "tsc && vite build"
functions = "netlify/functions"
publish = "dist"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
## (optional) Settings for Netlify Dev
## https://github.com/netlify/cli/blob/main/docs/netlify-dev.md#project-detection
#[dev]
# command = "yarn start" # Command to start your dev server
# port = 3000 # Port that the dev server will be listening on
# publish = "dist" # Folder with the static content for _redirect file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment