fix(bridge): install bridge module at the end (#2611)

This commit is contained in:
Anthony Fu 2022-01-06 02:22:13 +08:00 committed by GitHub
parent 6d88a7314d
commit 8fff48b8df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,8 @@ module.exports.defineNuxtConfig = (config = {}) => {
config.buildModules = []
}
if (!config.buildModules.find(m => m === '@nuxt/bridge' || m === '@nuxt/bridge-edge')) {
config.buildModules.unshift('@nuxt/bridge')
// Ensure other modules register their hooks before
config.buildModules.push('@nuxt/bridge')
}
}
return config