Keywords: Tomcat, Console was closed after executing startup.bat

Commands

NPM Commands

How to display Vue version:

npm list vue

Tools

Hot Reloading (Vue 2)

A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
https://github.com/vuejs-templates/webpack

Tutorials

Youtube Tutorials

Learn Vue.js - Full Course for Beginners - 2019
https://www.youtube.com/watch?v=4deVCNJq3qc

Create A Vue.js Loading Spinner Tutorial In 2020 - Vue Spinner Fun!
https://www.youtube.com/watch?v=VPOVOlVQwB8
Vue 360 Course
https://program-with-erik.ck.page/3f760e1d01

Issues

Index.html page goes white while running in Tomcat

Case:
Index.html which generated by Vue got blank after deploying in Tomcat webapp, and there’re some 404 errors in Chrome console:

Failed to load resource: the server responded with a status of 404 (Not Found)
app.c2115832.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found)
chunk-vendors.fb29d323.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found)
app.c2115832.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found)
app.8d0d60ac.css:1 
Failed to load resource: the server responded with a status of 404 (Not Found)

Solution:
Add publicPath: '' in vue.config.js. e.g.:

module.exports = {
  
  publicPath: '',
 
  lintOnSave: true,
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src'))
      .set('_c', resolve('src/components'))
  },
 
  productionSourceMap: false
}

Reference:
https://github.com/vuejs/vue-cli/issues/5162


I am a forest, and a night of dark trees: but he who is not afraid of my darkness, will find banks full of roses under my cypresses. ― Friedrich Nietzsche, Thus Spoke Zarathustra