From ef162a31b3c377ae82deeb31f3067b3e6e2c7e4f Mon Sep 17 00:00:00 2001 From: CanisMinor Date: Thu, 16 Nov 2023 15:33:13 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Fix=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dumirc.ts | 13 ------------- package.json | 7 +++---- src/services/genMarkdownInstallation.ts | 4 ++-- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/.dumirc.ts b/.dumirc.ts index 1a1f06f..79ce8e5 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -2,7 +2,6 @@ import { defineConfig } from 'dumi'; import { description, homepage, name } from './package.json'; -const isProduction = process.env.NODE_ENV === 'production'; const isWin = process.platform === 'win32'; const themeConfig = { @@ -89,18 +88,6 @@ export default defineConfig({ define: { 'process.env': process.env, }, - extraBabelPlugins: [ - 'babel-plugin-antd-style', - [ - 'babel-plugin-styled-components', - { - displayName: process.env.NODE_ENV === 'development', - minify: isProduction, - pure: true, - transpileTemplateLiterals: true, - }, - ], - ], favicons: ['https://npm.elemecdn.com/@lobehub/assets-favicons/assets/favicon.ico'], locales: [{ id: 'en-US', name: 'English' }], mfsu: isWin ? undefined : {}, diff --git a/package.json b/package.json index cb42a5c..e348e70 100644 --- a/package.json +++ b/package.json @@ -83,15 +83,14 @@ "zustand-utils": "^1" }, "devDependencies": { - "@commitlint/cli": "^18.0.0", + "@commitlint/cli": "^18", "@lobehub/lint": "latest", "@testing-library/react": "^14", "@types/lodash-es": "^4", "@types/react": "^18", "@types/react-dom": "^18", "@vitest/coverage-v8": "latest", - "babel-plugin-antd-style": "latest", - "commitlint": "^18.0.0", + "commitlint": "^18", "concurrently": "^8", "cross-env": "^7", "dumi": "^2", @@ -100,7 +99,7 @@ "father": "4.3.1", "husky": "^8", "jsdom": "^22", - "lint-staged": "^15.0.0", + "lint-staged": "^15", "prettier": "^3", "react": "^18", "react-dom": "^18", diff --git a/src/services/genMarkdownInstallation.ts b/src/services/genMarkdownInstallation.ts index 79df222..df7e7a2 100644 --- a/src/services/genMarkdownInstallation.ts +++ b/src/services/genMarkdownInstallation.ts @@ -15,7 +15,7 @@ export const genMarkdownInstallation = (options: MarkdownInstallationOptions) => const [bunShield, bunLink] = bunShields; const esmBlock = ` -> **Important**\\ +> [!IMPORTANT]\\ > This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). `; @@ -32,7 +32,7 @@ $ ${bun ? 'bun add' : 'pnpm install'} ${packageName} const nextjsBlock = ` ### Compile with Next.js -> **Note**\\ +> [!NOTE]\\ > By work correct with Next.js SSR, add \`transpilePackages: ['${packageName}']\` to \`next.config.js\`. For example: \`\`\`js