0๐
Eh, this is a tumbleweed. I fixed it using isServer
:
if (isServer) {
// https://github.com/nuxt/nuxt.js/issues/438
config.externals = [ nodeExternals({
whitelist: ['vue-videobg']
})]
}
0๐
If you use Nuxt v.2.0, require is no more encouraged.
This what says the changelog of the 2.0 :
Upgrade nuxt.config.js
, modules
and serverMiddleware
to use import/export
instead of require
Source:stackexchange.com