-1
Firebase has its own polyfill package included in the sdk.
You need to import that package by:
- Creating
/plugins/polyfills.js
containing:
import '@firebase/polyfill';
You can, instead, import in that file the polyfills you think you need individually, so the final bundle will be smaller. Example:
import '@firebase/polyfill/node_modules/core-js/features/object/values';
- Add to your
nuxt.config.js
:
plugins: [
{ src: '~plugins/polyfills', mode: 'client' },
],
Source:stackexchange.com