Closed shijunti19 closed 5 years ago
把你在ssr使用jroll时遇到的问题贴上来
if (process.browser) {
let JRoll = require('n1100/ignore_lib/scroller/jroll.js')
}
let VueInfinite2 = require('n1100/ignore_lib/scroller/jroll-vue-infinite2.js')
console.log(VueInfinite2.default())
jroll因为有windows肯定不能服务器上渲染 那只能改jroll-vue-infinite2.js了,这个怎么我不确定,我现在只改了导出方法,因为import似乎不符合加载顺序,import在vscode里必须放到顶部,不然规则报错
感觉现在的工具越来越复杂了,在入口index.html用script标签引入JRoll,在使用JRroll的地址标记为全局变量不让eslint规则报错就可以了吧
ssr也是常用的一个技术!希望插件支持下看下怎么写这个扩展