Static GitHub Issues

[1253] When does process.BROWSER_BUILD receive value?

prev: Error render client side dynamic component
next: syntax-optional-chaining isn't working

I am still confused on how process.BROWSER_BUILD. From the example in the docs, it seems like it's once the component is loaded in the client.

if (process.BROWSER_BUILD) {
  const vSelect = require('vue-select');
  Vue.component('v-select', vSelect)
  console.log('this is never hit')
}

Unfortunately, I have tried everything I can to import the above component without running into such issue but no luck, yet. Apologies if this has an obvious solution, it just happens that I'm yet to get how it works. I'm also aware that window is available in the mounted lifecycle but I can't import dependencies in the method.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1107">#c1107</a>)</em></sub></div>