title: vue-cli: dist/js/ is not found in website source
body: <p><strong>Problem:</strong> I'm building a website with vue-CLI. When I run the dev server with <code>npm run serve</code> everything displays the way it should.  After running <code>npm run build</code> a <code>/dist</code> folder is being created. Then when running <code>npm start</code> and starting the localhost server, in website source, instead of all js files in <code>dist/js</code> only <code>app.d574a975.js</code> is being shown (however all other js files are present in <code>/dist</code> directory locally) and, therefore, when accessing <code>localhost:5000</code> (my port is <code>5000</code>) I'm getting <code>localhost/:1 GET http://localhost:5000/js/chunk-vendors.3fcb4836.js/ net::ERR_ABORTED 404 (Not Found)</code> error and the page goes blank. Is there a way to fix this? I'm quite new to web development, so I will appreciate any help.</p>
  <p><strong>May be important:</strong></p>
  <ul>
  <li>I've already tried deploying it on the localhost and it worked just fine. However, then I tried adding middleware to handle the <code>404</code> error and since then the app has been misbehaving and printing out the above-mentioned error in the console.</li>
  <li>I've tried rebuilding the app from ground up by recreating vue app with <code>vue create</code>, reinstalling same dependencies and copypasting the code from original project. And for some unknown reason it worked just fine, the <code>dist/js</code> had all files in it.</li>
  </ul>
  <p><strong>Project folder architecture:</strong></p>
  <p><a href="https://i.stack.imgur.com/Hpf91.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hpf91.png" alt="Project folder architecture" /></a></p>
  <p><strong>server.js</strong>:</p>
  <pre class="lang-js prettyprint-override"><code>const express = require('express')
  const mongoose = require('mongoose')
  const morgan = require('morgan')
  const path = require('path')
  const rateLimit = require('express-rate-limit')
  
  let app = express();
  const port = 5000;
  
  const limiter = rateLimit({
      windowMs: 10 * 60 * 1000,
      max: 300 
  })
  app.use(limiter)
  app.set('trust proxy', 1)
  
  app.use(express.json())
  app.use(express.urlencoded({extended: false}))
  app.use(morgan('dev'))
  app.use('/api/hometasks', require('./api/hometask'))
  app.use('/api/auth', require('./api/auth'))
  app.use('/api/groups', require('./api/groups'))
  app.use('/', express.static(path.join(__dirname, '../dist/')))
  app.listen(port)
  </code></pre>
  <p><strong>main.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>import { createApp } from 'vue/dist/vue.esm-bundler';
  import { createRouter, createWebHistory } from 'vue-router'
  import App from './App.vue'
  import Main from './components/corepages/main.vue'
  import PageNotFound from './components/infopages/pageNotFound.vue'
  
  const router = createRouter({
      history: createWebHistory(),
      routes: [
          {path: '/', component: Main},
          {path: '/:pathMatch(.*)*', component: PageNotFound}
      ]
  })
  
  const app = createApp(App)
  app.use(router)
  app.mount('#app')
  </code></pre>