Complete the code to build the Vue app for production.
npm run [1]Running npm run build creates the optimized files for static hosting.
Complete the code to serve the built files locally for testing.
npx [1] distnpx http-server dist serves the static files locally for preview.
Fix the error in the Vue config to set the correct base path for static hosting.
export default {
[1]: '/my-app/'
}The publicPath option sets the base URL for the app when deployed.
Fill both blanks to configure the Vue app to output files to a folder named 'static' and set assets directory to 'assets'.
export default {
outputDir: '[1]',
assetsDir: '[2]'
}outputDir sets the build folder name, and assetsDir sets the folder for static assets inside it.
Fill all three blanks to create a simple GitHub Pages deployment script in package.json scripts.
"scripts": { "predeploy": "npm run [1]", "deploy": "gh-pages -d [2] --branch [3]" }
The predeploy script builds the app, and deploy publishes the dist folder to the gh-pages branch using gh-pages.