我想将 NextJS 与 firebase 云功能一起使用,我正在创建一个云功能:
import * as functions from 'firebase-functions';
import cors from 'cors';
import express from 'express';
import next from 'next';
const nextApp = next({ dev: false });
const handle = nextApp.getRequestHandler();
nextApp
.prepare()
.then(() => {
const server = express();
server.use(cors({ origin: true }));
server.get('/a', (req, res) => {
return nextApp.render(req, res, '/b', req.query);
});
server.get('/b', (req, res) => {
return nextApp.render(req, res, '/a', req.query);
});
server.get('*', (req, res) => {
return handle(req, res);
});
})
.catch(ex => {
console.error(ex.stack);
process.exit(1);
});
export let app = functions.https.onRequest(nextApp);
NextJS 使用我的 JS 应用程序的构建创建一个文件夹。
问题是我无法在云端上传 NextJS 构建文件夹。如何包含此文件夹?
GitHub问题=> https://github.com/zeit/next.js/issues/2017