mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +00:00
fix(nitro): update firebase preset to handle mjs output (#1360)
This commit is contained in:
parent
a55c19c53b
commit
018302cb0b
@ -53,10 +53,10 @@ async function writeRoutes ({ output: { publicDir, serverDir }, _nuxt: { rootDir
|
||||
return obj
|
||||
}, {} as Record<string, string>)
|
||||
|
||||
let nodeVersion = '12'
|
||||
let nodeVersion = '14'
|
||||
try {
|
||||
const currentNodeVersion = fse.readJSONSync(join(rootDir, 'package.json')).engines.node
|
||||
if (['12', '10'].includes(currentNodeVersion)) {
|
||||
if (['16', '14'].includes(currentNodeVersion)) {
|
||||
nodeVersion = currentNodeVersion
|
||||
}
|
||||
} catch {}
|
||||
@ -66,7 +66,8 @@ async function writeRoutes ({ output: { publicDir, serverDir }, _nuxt: { rootDir
|
||||
JSON.stringify(
|
||||
{
|
||||
private: true,
|
||||
main: './index.js',
|
||||
type: 'module',
|
||||
main: './index.mjs',
|
||||
dependencies,
|
||||
devDependencies: {
|
||||
'firebase-functions-test': 'latest',
|
||||
|
Loading…
Reference in New Issue
Block a user