From 45bf52f30fd3e911c9fe31ff99fb8801fd563001 Mon Sep 17 00:00:00 2001 From: huxiyang3 <1872591453@qq.com> Date: Thu, 31 Oct 2024 11:21:21 +0800 Subject: [PATCH 1/3] fix: build --- vite.config.site.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vite.config.site.ts b/vite.config.site.ts index 8085ff60ec..7777b62db0 100644 --- a/vite.config.site.ts +++ b/vite.config.site.ts @@ -21,11 +21,11 @@ export default defineConfig(async (): Promise => { resolve: { alias: [ { - find: '@nutui/nutui-react/dist/locale/enUS', + find: '@nutui/nutui-react/dist/locale/en-US', replacement: resolve(__dirname, './src/locales/en-US.ts'), }, { - find: '@nutui/nutui-react-taro/dist/locales/en-US.ts', + find: '@nutui/nutui-react-taro/dist/locales/en-US', replacement: resolve(__dirname, './src/locales/en-US.ts'), }, { find: '@', replacement: resolve(__dirname, './src') }, @@ -42,9 +42,12 @@ export default defineConfig(async (): Promise => { css: { preprocessorOptions: { scss: { - // example : additionalData: `@import "./src/design/styles/variables";` + // example : additionalData: `@import "./src/dclearesign/styles/variables";` // dont need include file extend .scss + api: 'modern-compiler', additionalData: fileStr, + // 这里查看可选值:https://github.com/sass/sass/blob/1c9ec00/js-api-doc/deprecations.d.ts#L180 + silenceDeprecations: ['import', 'global-builtin'], }, postcss: { plugins: [ From 07695a0af89d39939a7bf42dd3ea89bb54551a5e Mon Sep 17 00:00:00 2001 From: huxiyang3 <1872591453@qq.com> Date: Thu, 31 Oct 2024 11:33:24 +0800 Subject: [PATCH 2/3] fix: build taro site failed --- .github/workflows/ci.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75a27e356f..1e4e1b84a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,27 +61,27 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Install pnpm - run: corepack enable pnpm + - name: Install pnpm + run: corepack enable pnpm - - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'pnpm' + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'pnpm' - - name: Install dependencies - run: pnpm install + - name: Install dependencies + run: pnpm install - - name: Build NutUI-React - run: npm run build + - name: Build NutUI-React + run: npm run build - - name: Build NutUI-React-Taro - run: npm run build:taro + - name: Build NutUI-React-Taro + run: npm run build:taro - - name: Build NutUI-React Demo - run: npm run build:site + - name: Build NutUI-React Demo + run: npm run build:site - - name: Build NutUI-React Taro H5 Demo - run: npm run build:taro:site + - name: Build NutUI-React Taro H5 Demo + run: npm run build:taro:site From 7fb5cc3fe519ba5e56056fc55d9c44cd03bb9c20 Mon Sep 17 00:00:00 2001 From: huxiyang3 <1872591453@qq.com> Date: Thu, 31 Oct 2024 13:32:46 +0800 Subject: [PATCH 3/3] fix: ci --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e4e1b84a1..933f3b0b77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,4 +84,5 @@ jobs: run: npm run build:site - name: Build NutUI-React Taro H5 Demo + if: github.ref == 'refs/heads/next' run: npm run build:taro:site