比如靜態(tài)資源是用vue寫的肄梨,yarn build 或npm build后生成dist(可以是別的名字)
npm build
或
yarn build
執(zhí)行g(shù)f-cli pack命令 gf-cli是我在Linux系統(tǒng)上的別名碗短,在windows中如果不起別名直接gf就
gf-cli pack 靜態(tài)資源build的dist路徑 生成的go文件 -p 靜態(tài)資源build的dist路徑 -n 新的文件目錄
如:我的dist在 /fronted/admin/dist
gf-cli pack fronted/admin/dist packed/general.go -p /fronted/admin/dist -n packed