From 771483b7b53b4eaa235c97f4b8c0709d69f5a2f0 Mon Sep 17 00:00:00 2001 From: Taso Date: Tue, 13 Apr 2021 18:03:39 -0400 Subject: [PATCH] fix(phone/watch): Implement watch using craco and writing to disk --- phone/craco.config.js | 4 ++++ phone/package.json | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/phone/craco.config.js b/phone/craco.config.js index 5c0b089..3718fb3 100644 --- a/phone/craco.config.js +++ b/phone/craco.config.js @@ -59,4 +59,8 @@ module.exports = { return webpackConfig; }, }, + devServer: (devServerConfig) => { + devServerConfig.writeToDisk = true + return devServerConfig + } }; diff --git a/phone/package.json b/phone/package.json index aa4452c..80e3b59 100644 --- a/phone/package.json +++ b/phone/package.json @@ -46,7 +46,6 @@ "@types/react-router-dom": "^5.1.7", "@wojtekmaj/enzyme-adapter-react-17": "^0.6.1", "cp-cli": "^2.0.0", - "cra-build-watch": "^3.2.0", "cross-env": "^7.0.2", "ts-loader": "^8.1.0", "typescript": "3.9.7" @@ -55,7 +54,7 @@ "i18n:missing": "node --experimental-json-modules i18n.missingKeys.js", "copy:config": "cp-cli ../config.json ./src/config.autogen.json", "start": "craco start", - "watch": "cra-build-watch --disable-chunks --build-path ../resources/html --output-filename dev.js", + "watch": "craco watch", "build": "yarn copy:config && craco build", "test": "craco test --watchAll=false --testMatch **/src/**/*.test.{ts,js,tsx}", "build:craco": "craco build"