[Vuejs]-Tell Webpack Where to Find Static Assets in Vue Application

0👍

Seeing file:/// URLs implies that you’re not viewing the files through a dev server. You’re probably opening up index.html directly (e.g., by double-clicking index.html). If that’s the case, you need to start up a server in dist, and navigate to it from your browser:

  1. Open a Terminal, and CD into <project_root>/dist.
  2. Run python -m SimpleHTTPServer, which should print out something like Serving on 0.0.0.0 port 8000. Make note of the port number for the next step. (Alternatively, run http-server)
  3. Open a browser, and navigate to http://localhost:8000.

Leave a comment