publishing react project on NETLIFY
Fri Dec 29 2023 19:24:22 GMT+0000 (Coordinated Universal Time)
Saved by
@eziokittu
1. set these for the project (name accordingly)
for REACT, publish directory is "build"
Base directory = my-portfolio-frontend
Package directory = Not set
Build command = npm run build
Publish directory = my-portfolio-frontend/build
2.
To Fix babel... warning, write this command -
npm install --save-dev @babel/plugin-proposal-private-property-in-object
Next create a new file and paste this
// .babelrc
{
"presets": [
"react-app"
],
"plugins": [
"@babel/plugin-proposal-private-property-in-object"
// Add any other plugins you may have here
]
}
3.
In the root folder add a new file and paste it
// netlify.toml
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
4. Remove all the warnings from the project
content_copyCOPY
https://chat.openai.com/?__cf_chl_tk
Comments