Using `optional chaining operator` operator (.?) in NuxtJs

PHOTO EMBED

Thu Mar 18 2021 15:50:53 GMT+0000 (UTC)

Saved by @brunomgmateus #javascript #nuxtjs #babel #es2020

// Of course, before that, you should install @babel/plugin-proposal-optional-chaining
// npm i -D @babel/plugin-proposal-optional-chaining


// in nuxt.config.js
{
  // ...
  build: {
    // ....
    babel: {
      plugins: [
        '@babel/plugin-proposal-optional-chaining'
      ]
    }
  }
}


content_copyCOPY

https://stackoverflow.com/questions/61652964/nuxt-using-optional-chaining-operator-operator