I. Description of the problem
After executing the command npm run build, package generated dist folder, access time reported the following error:
Second, the solution
In the root directory, create vue.config.js file, as follows,
module.exports = { publicPath:'./', configureWebpack:{ resolve: { alias: { 'assets': '@/assets', 'common': '@/common', 'components': '@/components', 'network': '@/network', 'views': '@/views', 'plugins': '@/plugins', } } } }
Packing again, smooth access: