Here is an overview of the package.json file for my Vue.js application:
package.json
{ "name": "vue_app", "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve --open", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, "dependencies": { "axios": "^0.18.0", "vue": "^2.5.13", "vue-router": "^3.0.1", "vuex": "^3.0.1" }, ... } <p>After building the Vue app, it generates an index.html file located at:</p> <p><code>dist/index.html
<body> <noscript><strong>We're sorry but vue_app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript> ... </body>
The issue arises when attempting to fetch static files - specifically
/js/vendor.be88a6a7.js
returns a 404 error. However, calling/static/js/vendor.be88a6a7.js
successfully retrieves the file. To resolve this, I had to prepend/static
to all static URL paths. Unfortunately, I could not find a webpack.conf file in that directory.