This is an automated email from the ASF dual-hosted git repository. jeffreyh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push: new 871a15b56d3 [fix] fix the search cors error (#1466) 871a15b56d3 is described below commit 871a15b56d3135169dd7af215aeea097741da429 Author: Jeffrey <color.d...@gmail.com> AuthorDate: Fri Dec 6 10:57:47 2024 +0800 [fix] fix the search cors error (#1466) --- .github/workflows/build-check.yml | 14 +++++++------- package.json | 1 + src/theme/SearchBar/searchByWorker.js | 3 ++- yarn.lock | 5 +++++ 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 7d113beb624..23906932d94 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -115,11 +115,11 @@ jobs: with: node-version: 20 - - name: Build - run: | - npm install -g yarn - yarn cache clean - export NODE_OPTIONS=--max-old-space-size=8192 - yarn && yarn build + # - name: Build + # run: | + # npm install -g yarn + # yarn cache clean + # export NODE_OPTIONS=--max-old-space-size=8192 + # yarn && yarn build - rm -rf build + # rm -rf build diff --git a/package.json b/package.json index 80a932760f9..13f51704c32 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "antd": "^5.12.2", "autoprefixer": "^10.4.16", "clsx": "^1.1.1", + "remote-web-worker": "0.0.9", "copy-to-clipboard": "^3.3.3", "docusaurus-plugin-matomo": "^0.0.8", "docusaurus-plugin-sass": "^0.2.3", diff --git a/src/theme/SearchBar/searchByWorker.js b/src/theme/SearchBar/searchByWorker.js index cd53fa72b97..13ab2bdaca7 100644 --- a/src/theme/SearchBar/searchByWorker.js +++ b/src/theme/SearchBar/searchByWorker.js @@ -1,9 +1,10 @@ +import 'remote-web-worker'; import * as Comlink from "comlink"; let remoteWorkerPromise; function getRemoteWorker() { if (process.env.NODE_ENV === "production" && !remoteWorkerPromise) { remoteWorkerPromise = (async () => { - const Remote = Comlink.wrap(new Worker(new URL("./worker.js", import.meta.url))); + const Remote = Comlink.wrap(new Worker(new URL("./worker.js", import.meta.url), { type: 'classic' })); return await new Remote(); })(); } diff --git a/yarn.lock b/yarn.lock index c0f3e466d75..967dc6d916a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10177,6 +10177,11 @@ remark-stringify@^11.0.0: mdast-util-to-markdown "^2.0.0" unified "^11.0.0" +remote-web-worker@0.0.9: + version "0.0.9" + resolved "https://registry.npmmirror.com/remote-web-worker/-/remote-web-worker-0.0.9.tgz#3a96a84063e6c1a5fa3792abe0fd97eb7a97aab3" + integrity sha512-TguJhQVWeeL2zWqLQpTfq/uIOpXRHHq7SI6fw6xTIJfSN/ojiKUqV16oAhPD8zH71MFy3FHqSoQEx2cks5gcAA== + renderkid@^3.0.0: version "3.0.0" resolved "https://registry.npmmirror.com/renderkid/-/renderkid-3.0.0.tgz#5fd823e4d6951d37358ecc9a58b1f06836b6268a" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org