webpack server开发vue时会发现url会带上dist,例如:http://localhost:8080/dist/index
我们可以打开vue.config.js文件,然后把publicPath的值改成 / 后重新编译重启
npm run build
npm run serve
Url中的dist已经没有了
webpack server开发vue时会发现url会带上dist,例如:http://localhost:8080/dist/index
我们可以打开vue.config.js文件,然后把publicPath的值改成 / 后重新编译重启
npm run build
npm run serve
Url中的dist已经没有了