vuepress-reco / vuepress-theme-reco

🎨 This is the repo for vuepress-theme-reco 2.
https://vuepress-theme-reco.recoluan.com
MIT License
539 stars 175 forks source link

npm run build后,生成的index.html 失去了样式 #170

Closed duktig666 closed 1 year ago

duktig666 commented 1 year ago

Bug report

执行 npm run dev 正常,但是执行npm run build后,生成的index.html 失去了样式

What is actually happening?

image

Other relevant information

recoluan commented 1 year ago

项目不在根目录下,需要配置base,指定子目录

duktig666 commented 1 year ago

"dest": "docs/.vuepress/dist", docsDir: 'docs',

image

这样配置应该没问题

duktig666 commented 1 year ago

https://blog.csdn.net/weixin_57677300/article/details/128017651

找到了解决办法,这样可以解决。 但是访问链接也会加 #

从这个 https://duktig.cn/
变成 http://duktig.cn/#/