diff --git a/packages/canyon-platform/package.json b/packages/canyon-platform/package.json index f9a901bc..00d802fd 100644 --- a/packages/canyon-platform/package.json +++ b/packages/canyon-platform/package.json @@ -50,6 +50,8 @@ "@typescript-eslint/parser": "^8.16.0", "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", + "babel-plugin-canyon": "2.0.3", + "babel-plugin-istanbul": "^7.0.0", "eslint": "^9.15.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.31.0", diff --git a/packages/canyon-platform/src/auto-imports.d.ts b/packages/canyon-platform/src/auto-imports.d.ts index 487ba8c7..13f28c11 100644 --- a/packages/canyon-platform/src/auto-imports.d.ts +++ b/packages/canyon-platform/src/auto-imports.d.ts @@ -6,7 +6,7 @@ // biome-ignore lint: disable export {} declare global { - const Alert: (typeof import("antd"))["Alert"] + const Alert: typeof import('antd')['Alert'] const Avatar: typeof import('antd')['Avatar'] const Breadcrumb: typeof import('antd')['Breadcrumb'] const Button: typeof import('antd')['Button'] diff --git a/packages/canyon-platform/vite.config.ts b/packages/canyon-platform/vite.config.ts index 9a268883..41bbc99f 100644 --- a/packages/canyon-platform/vite.config.ts +++ b/packages/canyon-platform/vite.config.ts @@ -9,7 +9,10 @@ export default defineConfig({ plugins: [ react({ babel: { - plugins: process.env.NODE_ENV === "development" ? [] : [], + plugins: process.env.NODE_ENV === "development" ? [] : [ + 'istanbul', + 'canyon' + ], }, }), AutoImport({