Nuxt.js: Problem with jquery plugins and server side rendering

Created on 26 Nov 2017  路  6Comments  路  Source: nuxt/nuxt.js

Hi, I have got stuck in a propensity of using : https://uiv.wxsm.space/typeahead
Whenever I add it in plugins with ssr: false it does not produce the dropdown section on page refresh . because the produced html through server rendering , does not have it .
When I set the ssr : true , it shows that window is undefined.
How should i use this plugin in nuxt

This question is available on Nuxt.js community (#c1970)

Most helpful comment

@ahadyekta Try putting typehead component in <no-ssr></no-ssr> tags.

All 6 comments

@ahadyekta, you mean _bootstrap_ plugin, right? Or UIV... (jquery?)

This package is bootstrap components built for vue.
When I use it , the server and client rendering don`t match because the jquery makes some html that only client has it. The server rendering does not run jquery. So the SSR result is not what Iexpect.

@ahadyekta Try putting typehead component in <no-ssr></no-ssr> tags.

window is undefined is a bug of uiv lib, and already been fixed in the latest version. Pls upgrade your uiv version and try it again with SSR enabled.

This seems to be resolved now. Closing. Reopen if still happens.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

uptownhr picture uptownhr  路  3Comments

danieloprado picture danieloprado  路  3Comments

vadimsg picture vadimsg  路  3Comments

o-alexandrov picture o-alexandrov  路  3Comments

VincentLoy picture VincentLoy  路  3Comments