Skip to content

Instantly share code, notes, and snippets.

View hatakancicek's full-sized avatar
🐼
hustle

Hüseyin Atakan Çiçek hatakancicek

🐼
hustle
  • Amsterdam, NL
View GitHub Profile
{
"functions": {
"predeploy": "yarn clean && yarn build:app && yarn build:functions && yarn copy:deps && yarn copy:pages",
"source": "dist/functions"
},
"hosting": {
"predeploy": "yarn copy:next && yarn copy:static",
"public": "dist/public",
"rewrites": [
{
{
"scripts": {
"dev": "next src/app",
"clean": "rimraf dist",
"build:app": "next build src/app",
"build:functions": "cpx \"src/functions/**/*.*\" dist/functions",
"copy:static": "cpx \"src/app/static/**/*.*\" dist/public/static",
"copy:next": "cpx \"dist/next/static/**/*.*\" dist/public/_next/static",
"copy:deps": "cpx \"*{package.json,package-lock.json}\" dist/functions",
"copy:pages": "cpx \"dist/next/serverless/pages/**/*.*\" dist/functions/pages"
{
"presets": [["next/babel"]],
"plugins": [
[
"styled-components",
{
"ssr": true,
"displayName": true,
"preprocess": false
}
const onRequest = require("firebase-functions").https.onRequest;
const index = require("./pages/index");
exports.index = onRequest((req, res) => index.render(req, res));
{
"functions": {
"predeploy": "yarn clean && yarn build:app && yarn build:functions && yarn copy:deps && yarn copy:pages",
"source": "dist/functions"
},
"hosting": {
"predeploy": "yarn copy:next && yarn copy:static",
"public": "dist/public",
"rewrites": [
{
{
"projects": {
"production": "<YOUR_PROJECT_ID>"
}
}
{
"license": "MIT",
"name": "next-firebase-functions",
"version": "1.0.0",
"author": "Hüseyin Atakan Çiçek",
"repository": "https://github.com/hatakancicek/next-firebase-functions",
"engines": {
"node": "10"
},
"dependencies": {
// ...
"scripts": {
"copy:deps": "cpx \"*{package.json,package-lock.json}\" dist/functions"
}
// ...