This repository has been archived by the owner on Apr 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 633
vue项目添加publicPath后无法build #342
Comments
I have the same problem, too. |
一样的问题,而且如果不设置publicPath 静态资源的访问也有问题 设置了pubicpath就编译不起 |
I found a possible solution and wrote about it here. I hope it helps! |
和vue不vue没有关系. 还有这个插件不会影响的你的构建, 因为轮到它执行的时候你的项目已经构建结束了. |
我也有同样的问题 请问你找到解决的办法了吗? @xietongjian |
我也遇到了这个问题,vue-cli2,用了几个方法都不行 |
看来这是一个共性问题。这是由于prerender所启动的服务器找不到js文件导致的。 module.exports = {
publicPath: "/publicPath/",
outputDir: path.join(__dirname, "./dist", "/publicPath/"),
} 这样会在dist目录下生成一个/dist/publicPath这样的文件夹。 const options = {
staticDir: path.join(__dirname, "dist/"), //这里写到dist目录为止
indexPath: path.join(__dirname, "dist/publicPath/index.html"), //重要
} 如果还有问题可以联系我微信zks_1927 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
,如果将publicPath设置成‘/’就没问题。
想要打包后放入nginx二级目录下,请问如何解决。
The text was updated successfully, but these errors were encountered: