https://github.com/Coooi/nuxt-typescript-firebase-issue
Clone the sample project.
yarn install
yarn dev
You'll see that it's not building with the latest version of firebase.
To build normally.
Many errors regarding core-js + babel + firebase.
This issue doesn't sound related to TypeScript, it's cause of Firebase core-js
polyfill :
@kevinmarrec Thanks for testing!
Indeed, should I report this to Firebase team?
@Coooi Yes, cause they seem to do weird things :)
@kevinmarrec
Here's their answer: https://github.com/firebase/firebase-js-sdk/issues/2968#issuecomment-617975070
I'll try to add Firebase modules separately to see if it works, but I think worth checking that issue with nuxt/@nuxt/babel-preset-app
too.
Thanks for your contribution to Nuxt.js!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you would like this issue to remain open:
Issues that are labeled as pending
will not be automatically marked as stale.
This one should be rechecked in my opinion.
Can you try adding [email protected]
to your (direct) dependencies or configuring { corejs: { version: 3 }}
in the babel preset options?
Package managers such as npm or Yarn resolve to core-js@3
(dependency of Firebase JS SDK) without explicit installation. Since Nuxt.js (@nuxt/babel-preset-app
) uses core-js@2
as a default value and package managers resolves core-js
to core-js@3
, you need to tell package managers to use [email protected]
or configure Nuxt's babel preset to use core-js@3
as described in here.
corejs
option, failed to compile"core-js": 2
dependency, no errorscorejs: 3
, no errors@nuxt/babel-preset-app
's README for more info.
Starting [email protected], version of core-js detects automatically, And if you are using Nuxt < 2.14.0, you need to either install core-js@2 or use core-js@3
Most helpful comment
Can you try adding
[email protected]
to your (direct) dependencies or configuring{ corejs: { version: 3 }}
in the babel preset options?Package managers such as npm or Yarn resolve to
core-js@3
(dependency of Firebase JS SDK) without explicit installation. Since Nuxt.js (@nuxt/babel-preset-app
) usescore-js@2
as a default value and package managers resolvescore-js
tocore-js@3
, you need to tell package managers to use[email protected]
or configure Nuxt's babel preset to usecore-js@3
as described in here.corejs
option, failed to compile"core-js": 2
dependency, no errorscorejs: 3
, no errors@nuxt/babel-preset-app
's README for more info.