How to avoid error upgrading Nuxt 2 to Nuxt Bridge

2k views Asked by At

I am currently keen to updating my existing Nuxt 2 project to Nuxt Bridge as documented here:

https://v3.nuxtjs.org/getting-started/bridge

As for my nuxt.config file I used module.exports = { //config }

Exchanging it with the:

import { defineNuxtConfig } from '@nuxt/bridge'

export default defineNuxtConfig({
  // Your existing configuration
})

leads to a webpack error for me because of the "@nuxtjs/firebase" module:

enter image description here

How can I fix this?

1

There are 1 answers

0
Mazel On

You must specify an alias for tslib:

import { defineNuxtConfig } from '@nuxt/bridge'

export default defineNuxtConfig({
  alias: {
    tslib: 'tslib/tslib.es6.js'
  }
})

Follow this issue: https://github.com/nuxt/bridge/issues/25