From bd50a7c74a786ef82d61894a93608f45fdb4524b Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 31 Mar 2018 15:11:34 +0200 Subject: [PATCH 1/2] Better support React 16.3.0 (#4090) * Better support React 16.3.0 https://github.com/mridgway/hoist-non-react-statics/pull/43 * Lock version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 61d8c458..3d9d6475 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "fresh": "0.5.2", "friendly-errors-webpack-plugin": "1.6.1", "glob": "7.1.2", - "hoist-non-react-statics": "2.3.1", + "hoist-non-react-statics": "2.5.0", "htmlescape": "1.1.1", "http-errors": "1.6.2", "http-status": "1.0.1", From b39958e78037f2c99b2a0212355f5538ba94e589 Mon Sep 17 00:00:00 2001 From: Jonathan James Date: Sat, 31 Mar 2018 09:59:24 -0400 Subject: [PATCH 2/2] Fix serve command (#3989) * Fix serve command From the Firebase docs, you must use --only in order to run the local function emulator. See https://firebase.google.com/docs/functions/local-emulator * Add production env for firebase serve Doesn't work without this * Update text as suggested by @jthegedus --- examples/with-firebase-hosting/README.md | 8 ++------ examples/with-firebase-hosting/package.json | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/with-firebase-hosting/README.md b/examples/with-firebase-hosting/README.md index 5acc308f..63494e9a 100644 --- a/examples/with-firebase-hosting/README.md +++ b/examples/with-firebase-hosting/README.md @@ -43,13 +43,9 @@ npm run dev #### Run Firebase locally for testing: -Unfortunately I have been unable to get any combination of - -```bash -firebase serve --only functions,hosting ``` - -to locally host the built Next.js app as expected. [This issue is where solutions are being explored](https://github.com/firebase/firebase-tools/issues/535) and they will be shared here and on the [Next.js repo's similar issue](https://github.com/zeit/next.js/issues/3167) when discovered. +npm run serve +``` #### Deploy it to the cloud with Firebase: diff --git a/examples/with-firebase-hosting/package.json b/examples/with-firebase-hosting/package.json index 46088eea..850f45b1 100644 --- a/examples/with-firebase-hosting/package.json +++ b/examples/with-firebase-hosting/package.json @@ -4,7 +4,7 @@ "description": "Host Next.js SSR app on Firebase Cloud Functions with Firebase Hosting redirects.", "scripts": { "dev": "next src/app", - "serve": "echo \"for details see:\n\thttps://github.com/firebase/firebase-tools/issues/535 \n\thttps://github.com/zeit/next.js/issues/3167\";", + "serve": "NODE_ENV=production firebase serve --only functions,hosting", "deploy": "firebase deploy", "clean": "rimraf \"dist/functions\" && rimraf \"dist/public\"", "build-public": "cpx \"src/public/**/*.*\" \"dist/public\" -C",