可以参考如下文章
https://juejin.im/post/5cbc40ea6fb9a068b65e2aa6,
大致流程如图,但是有个问题是link的as用法写成as=script的时候并不能下载资源,这和我config配置了