From 671e23b9892e869316bbff3dacf22c53a364f618 Mon Sep 17 00:00:00 2001 From: cha0s Date: Wed, 20 Jan 2021 09:49:47 -0600 Subject: [PATCH] fix: HMR --- app/.neutrinorc.js | 4 +++- packages/http/src/build/.neutrinorc.js | 2 ++ packages/react/src/server.js | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/.neutrinorc.js b/app/.neutrinorc.js index 7de5070..4100347 100644 --- a/app/.neutrinorc.js +++ b/app/.neutrinorc.js @@ -29,7 +29,9 @@ module.exports = { }], }), mocha(), - node(), + node({ + hot: false, + }), (neutrino) => { [ 'components', diff --git a/packages/http/src/build/.neutrinorc.js b/packages/http/src/build/.neutrinorc.js index fdb03a4..6f7b612 100644 --- a/packages/http/src/build/.neutrinorc.js +++ b/packages/http/src/build/.neutrinorc.js @@ -41,6 +41,7 @@ const client = { (neutrino) => { web({ clean: false, + hot: false, html: { inject: false, template: `${neutrino.options.root}/client/index.ejs`, @@ -128,6 +129,7 @@ client.use.push((neutrino) => { const isProduction = 'production' === neutrino.config.get('mode'); if (!isProduction) { neutrino.config.devServer + .hot(false) .host(HTTP_DEV_HOST) .port(HTTP_DEV_PORT) .public(HTTP_DEV_PUBLIC); diff --git a/packages/react/src/server.js b/packages/react/src/server.js index b3b4e4b..ff87100 100644 --- a/packages/react/src/server.js +++ b/packages/react/src/server.js @@ -8,6 +8,7 @@ const middleware = (neutrino) => { }); neutrino.use(react({ clean: false, + hot: false, html: { inject: false, template: `${neutrino.options.root}/client/index.ejs`,