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
|
return obj
|
||||||
}, {} as Record<string, string>)
|
}, {} as Record<string, string>)
|
||||||
|
|
||||||
let nodeVersion = '12'
|
let nodeVersion = '14'
|
||||||
try {
|
try {
|
||||||
const currentNodeVersion = fse.readJSONSync(join(rootDir, 'package.json')).engines.node
|
const currentNodeVersion = fse.readJSONSync(join(rootDir, 'package.json')).engines.node
|
||||||
if (['12', '10'].includes(currentNodeVersion)) {
|
if (['16', '14'].includes(currentNodeVersion)) {
|
||||||
nodeVersion = currentNodeVersion
|
nodeVersion = currentNodeVersion
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
@ -66,7 +66,8 @@ async function writeRoutes ({ output: { publicDir, serverDir }, _nuxt: { rootDir
|
|||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
{
|
{
|
||||||
private: true,
|
private: true,
|
||||||
main: './index.js',
|
type: 'module',
|
||||||
|
main: './index.mjs',
|
||||||
dependencies,
|
dependencies,
|
||||||
devDependencies: {
|
devDependencies: {
|
||||||
'firebase-functions-test': 'latest',
|
'firebase-functions-test': 'latest',
|
||||||
|
Loading…
Reference in New Issue
Block a user