How does iview support SSR and Nuxt.js?

I looked through iview"s changelog and commit records to figure out how iview solved the SSR problem, but I couldn"t find the relevant code (maybe I didn"t translate it in detail enough), so I"d like to ask developers who are familiar with iview, iview"s ideas on solving SSR

raises this problem because when I write components that support Nuxt, I encounter the situation that components can render normally, but because browser-specific objects such as document and window are also loaded into the server environment during packaging, errors are reported all the time. Although the components can be used normally, there is no solution to the error. All components of iview do not have this problem, but there are also browser-specific objects in its package file

Please developers who understand the principle can take some time out of their busy schedule to answer it. Thank you very much!


move the code related to the objects included in the browser into mounted , and only beforeCreate and created will be called in ssr

.
Menu