From b83c8636fa3c5d77d13016304dc2d3a490d5e38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Mon, 1 Jun 2020 19:29:58 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=93=A6=20enable=20ESBUILD=20for?= =?UTF-8?q?=20site=20again=20(#24657)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :package: enable ESBUILD for site again * re-enable ESBUILD :package: --- .github/workflows/lighthouse-ci.yml | 2 +- components/radio/__tests__/__snapshots__/demo.test.js.snap | 4 ++-- components/radio/demo/disabled.md | 4 ++-- package.json | 2 +- site/theme/template/Content/MainContent.jsx | 4 +++- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index 9bde98387b..7fdb7e483a 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -7,5 +7,5 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 - run: npm install && npm install -g @lhci/cli@0.4.x - - run: ESBUILD=1 npm run site + - run: npm run site - run: lhci autorun --upload.target=temporary-public-storage diff --git a/components/radio/__tests__/__snapshots__/demo.test.js.snap b/components/radio/__tests__/__snapshots__/demo.test.js.snap index 0e39eec99f..3aa3dbe8a9 100644 --- a/components/radio/__tests__/__snapshots__/demo.test.js.snap +++ b/components/radio/__tests__/__snapshots__/demo.test.js.snap @@ -417,7 +417,6 @@ Array [ Disabled , -
, , +
, diff --git a/package.json b/package.json index f468b05553..53c29e7260 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "pretty-quick": "pretty-quick", "pub": "npm run version && antd-tools run pub", "prepublishOnly": "antd-tools run guard", - "site": "cross-env NODE_ICU_DATA=node_modules/full-icu concurrently \"bisheng build --ssr -c ./site/bisheng.config.js\" \"npm run color-less\"", + "site": "cross-env NODE_ICU_DATA=node_modules/full-icu ESBUILD=1 concurrently \"bisheng build --ssr -c ./site/bisheng.config.js\" \"npm run color-less\"", "sort": "npx sort-package-json", "sort-api": "antd-tools run sort-api-table", "start": "antd-tools run clean && cross-env NODE_ENV=development concurrently \"npm run color-less\" \"bisheng start -c ./site/bisheng.config.js\"", diff --git a/site/theme/template/Content/MainContent.jsx b/site/theme/template/Content/MainContent.jsx index dd38131d71..ef5b75f175 100644 --- a/site/theme/template/Content/MainContent.jsx +++ b/site/theme/template/Content/MainContent.jsx @@ -108,7 +108,9 @@ class MainContent extends Component { } componentWillUnmount() { - this.scroller.destroy(); + if (this.scroller) { + this.scroller.destroy(); + } window.removeEventListener('load', this.handleInitialHashOnLoad); window.removeEventListener('hashchange', this.handleHashChange); clearTimeout(this.timeout);