From 60300c2da17bc3d69a8966e7bd876f1feae3029b Mon Sep 17 00:00:00 2001 From: thecodrr Date: Fri, 22 Oct 2021 00:00:19 +0500 Subject: [PATCH] chore: upgrade packages and improve build perf --- apps/web/.env-cmdrc.js | 7 +++++++ apps/web/package.json | 3 ++- apps/web/public/index.html | 2 +- apps/web/src/common/db.js | 1 - apps/web/src/components/editor/tinymce.js | 6 ++++-- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/apps/web/.env-cmdrc.js b/apps/web/.env-cmdrc.js index 7e610ecd7..ccda0d189 100644 --- a/apps/web/.env-cmdrc.js +++ b/apps/web/.env-cmdrc.js @@ -1,8 +1,15 @@ const { execSync } = require("child_process"); +const { cpus } = require("os"); +const NUM_CPUS = cpus().length; +const IS_CI = process.env.CI; const gitHash = execSync("git rev-parse --short HEAD").toString().trim(); module.exports = { all: { + UV_THREADPOOL_SIZE: IS_CI ? NUM_CPUS : 2, + GENERATE_SOURCEMAP: false, + INLINE_RUNTIME_CHUNK: false, + DISABLE_ESLINT_PLUGIN: true, REACT_APP_GIT_HASH: gitHash, }, dev: { diff --git a/apps/web/package.json b/apps/web/package.json index 3ae72a3a8..203454790 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -11,7 +11,7 @@ "@mdi/react": "^1.4.0", "@notesnook/desktop": "file:./desktop/", "@rebass/forms": "^4.0.6", - "@streetwritersco/tinymce-plugins": "^1.3.1", + "@streetwritersco/tinymce-plugins": "^1.3.2", "@tinymce/tinymce-react": "^3.13.0", "axios": "^0.21.4", "clipboard-polyfill": "^3.0.3", @@ -72,6 +72,7 @@ "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-react": "^7.22.0", "eslint-plugin-react-hooks": "^4.2.0", + "file-loader": "^6.2.0", "find-process": "^1.4.4", "patch-package": "^6.4.7", "source-map-explorer": "^2.5.2", diff --git a/apps/web/public/index.html b/apps/web/public/index.html index 515f2b2fc..8db866bbe 100644 --- a/apps/web/public/index.html +++ b/apps/web/public/index.html @@ -6,7 +6,7 @@ /security#csp-meta-tag -->