Vue ssr introduces carousel plug-in to report error: window is not defined

vue ssr introduces carousel plug-in to report error: window is not defined;
the solution given in the official document is not quite clear: https://zh.nuxtjs.org/faq/win.

clipboard.png

1:


.vue

2:external_library


nuxt.config.js external_library

clipboard.png

clipboard.png

Aug.09,2021

if (process.BROWSER_BUILD) {
  require('external_library')
}

process.BROWSER_BUILD determine whether it is on the client
external_library refers to the module you want to apply

nuxt2

can be obtained globally via process.browser .
if (process.browser) {
  require('external_library')
}

and vendor: ['element-ui','external_library'] this has been removed from 2 without configuration.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9b37e-47614.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9b37e-47614.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?