From 3d4d6a0dfe49fa342af6ef5fcbf49317f4cdda39 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Wed, 26 May 2021 18:29:48 +0300 Subject: [PATCH] fix(watch): add missing bin property --- package.json | 3 +++ src/index.js | 2 +- src/next-on-netlify.js | 0 3 files changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/next-on-netlify.js diff --git a/package.json b/package.json index 19a5941296..4bf89bdd3d 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "3.3.1", "description": "Run Next.js seamlessly on Netlify", "main": "index.js", + "bin": { + "netlify-plugin-nextjs": "src/next-on-netlify.js" + }, "files": [ "helpers/**/*.js", "src", diff --git a/src/index.js b/src/index.js index 6588ab9618..5eb4746dbc 100644 --- a/src/index.js +++ b/src/index.js @@ -43,7 +43,7 @@ const watch = (functionsPath, publishPath) => { const runBuild = debounceFn( async () => { try { - execa.sync('next', ['build'], { stdio: 'inherit' }) + execa.sync('next', ['build'], { stdio: 'inherit', preferLocal: true }) await build(functionsPath, publishPath) } catch (error) { console.log(error) diff --git a/src/next-on-netlify.js b/src/next-on-netlify.js old mode 100644 new mode 100755