From b525fc08eb4d7b1a79393c0c7f07656c079e8268 Mon Sep 17 00:00:00 2001 From: zk Date: Wed, 9 Oct 2024 09:21:53 +0800 Subject: [PATCH] update --- package.json | 1 + tsconfig.json | 1 + vite.config.ts | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c4f684..0436200 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@typescript-eslint/eslint-plugin": "^6.15.0", "@typescript-eslint/parser": "^6.15.0", "@vitejs/plugin-vue": "^4.2.3", + "@vitejs/plugin-vue-jsx": "^4.0.1", "ant-design-vue": "^3.2.20", "echarts": "^5.4.3", "eslint": "^8.51.0", diff --git a/tsconfig.json b/tsconfig.json index 5c98ac5..0b08f57 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,6 +26,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", /* Linting */ "strict": true, "noUnusedLocals": true, diff --git a/vite.config.ts b/vite.config.ts index 2feb323..168169d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite'; import vue from '@vitejs/plugin-vue'; import { resolve } from 'path'; - +import vueJsx from '@vitejs/plugin-vue-jsx'; import postcssPluginPx2rem from 'postcss-plugin-px2rem'; import resolveExternalsPlugin from 'vite-plugin-resolve-externals'; @@ -29,6 +29,7 @@ export default defineConfig({ resolveExternalsPlugin({ AMap: 'AMap', }), + vueJsx(), ], css: { preprocessorOptions: {