web/web.go:9:12: pattern dist: no matching files found
Closed this issue · 6 comments
why444216978 commented
web/web.go:9:12: pattern dist: no matching files found
why444216978 commented
给您 QQ 发邮件了,辛苦大佬有时间看一眼
gphper commented
这个编译的时候是先要编译web目录下的vue项目的,然后再编译go代码,文档中写明了
why444216978 commented
哦对,我换了台机器,只 install 了,忘记 build 了,不过我理解后端服务不应该依赖前端代码的编译,静态目录可以用 http.Dir 去注册路由
gphper commented
看下go语言的embed
why444216978 commented
这是两件事儿吧,后端服务运行不应该依赖前端,这是设计层面的东西,你说的 embed 是实现层面的东西,设计上我理解不是特别合理。
gphper commented
你说的对,你可以按照自己的思路修改下,寻找一种更合理的方式,我当初为了解决将静态资源打包进二进制文件,只想到了这种