To add Netlify deployment and configuration to the web app, we need to make some updates to the project files. Here are the steps to accomplish this:
Add a netlify.toml file to the root of the project. This file is used to configure the Netlify deployment settings. The content of the netlify.toml file would look something like this:
[build]
command = "npm run build"
publish = "dist"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
Update the frontend/package.json file to include the necessary netlify-cli package as a development dependency. The updated content of the frontend/package.json file would look something like this:
Run npm install or yarn install to install the newly added package.
Commit the changes with an appropriate commit message, such as "Added Netlify deployment and configuration".
This setup will configure Netlify to use the npm run build command for building the Vue app and set the dist directory as the publish directory. Additionally, the netlify.toml file includes a redirect rule to ensure all requests are routed to the index.html file, allowing Vue Router to handle the routing on the client-side.
To add Netlify deployment and configuration to the web app, we need to make some updates to the project files. Here are the steps to accomplish this:
netlify.toml
file to the root of the project. This file is used to configure the Netlify deployment settings. The content of thenetlify.toml
file would look something like this:frontend/package.json
file to include the necessarynetlify-cli
package as a development dependency. The updated content of thefrontend/package.json
file would look something like this:Run
npm install
oryarn install
to install the newly added package.Commit the changes with an appropriate commit message, such as "Added Netlify deployment and configuration".
This setup will configure Netlify to use the
npm run build
command for building the Vue app and set thedist
directory as the publish directory. Additionally, thenetlify.toml
file includes a redirect rule to ensure all requests are routed to theindex.html
file, allowing Vue Router to handle the routing on the client-side.