After running the build command, the files are built successfully, but the served page is blank.
I see the following two messages on the console.
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
Am I doing something wrong?
In order to fix it I needed to change the publicPath to "/" in the vue.config.js file.
Hi,
To deploy your application, the path on your server has to match a publicPath property in vue.config.js.
If you are deploying a build folder in the root of your server then publicPath can be "/" if you want to deploy in some folder on your server you have to specify that in vue.config.js.