在使用nuxt框架进行静态打包部署时候每次总会有一两个界面报TypeError: renderContext.renderResourceHints is not a function的错误
一开始以为是asyncData中获取的数据有问题,在各种排查后返现数据没问题,再次编译还是会有错误,最后甚至把asyncdata方法给删除掉都还是有这个错误;
翻阅nuxt文档后发现了一个参数
突然想到可能是这个问题,于是赶紧去nuxt.config.js中配置
最后再次编译完美通过,缺点就是编译时间大大边长,所以可能的话还是用不用静态部署;
标签:function,TypeError,nuxtjs,静态,renderResourceHints,renderContext,nuxt From: https://www.cnblogs.com/rht555/p/17551168.html