Closed jpt closed 7 years ago
@dalphyx Any thoughts on resolving this?
@jpt OK, I will try to resolve this problem later. Personally, I have not used vue-headroom in SSR before, but I meet the same warn in other cases. Maybe you should import the compiler-included build Vue in server side.
@dalphyx Sounds good, I'll try importing the build with the compiler. It could be unrelated to SSR.
To get rid of the warning, might need to replace the template:
with render:
Like this:
render: h => {
return ('\n <div class="headroom-wrapper" :style="wrapperStyles">\n <div class="headroom" :style="innerStyle">\n <slot></slot>\n </div>\n </div>\n ')
},
But that may cause other problems...
@jpt I have transpiled template to render function and pass test in nuxt. You can try the latest version :)
@dalphyx that seems to have fixed it! Thanks so much for the quick response! 😄
Tried using vue-headroom and got the following error:
[Vue warn]: You are using the runtime-only build of Vue where the template option is not available. Either pre-compile the templates into render functions, or use the compiler-included build. (found in component)