Skip to content

Commit 326af38

Browse files
committed
fix: fixed import error in terminateDatabasesInGenerateHooks
1 parent 93ca96b commit 326af38

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/module.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,10 @@ function validateConfigKeys(options, currentEnv) {
326326
* See https://github.com/nuxt-community/firebase-module/issues/93
327327
*/
328328
function terminateDatabasesInGenerateHooks(ctx) {
329-
const firebaseDir = ctx.nuxt.options.srcDir + '/node_modules/firebase/'
330329
ctx.nuxt.hook('generate:before', async (generator) => {
331-
const { default: firebase } = await import(firebaseDir + 'app')
330+
const { default: firebase } = await import('firebase/compat/app')
331+
await import('firebase/compat/database')
332+
await import('firebase/compat/firestore')
332333

333334
if (!firebase.apps.length) {
334335
firebase.initializeApp(generator.options.firebase.config)

0 commit comments

Comments
 (0)