mirror of
https://gitee.com/lijingbo-2021/open-anylink-web.git
synced 2025-12-30 02:52:26 +00:00
jxp动态组件插件
This commit is contained in:
@@ -9,7 +9,10 @@ module.exports = {
|
||||
'@vue/eslint-config-prettier/skip-formatting'
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest'
|
||||
ecmaVersion: 'latest',
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'prettier/prettier': [
|
||||
@@ -27,6 +30,7 @@ module.exports = {
|
||||
{
|
||||
ignores: ['index'] // vue组件名称多单词组成(忽略index.vue)
|
||||
}
|
||||
]
|
||||
],
|
||||
'vue/jsx-uses-vars': 'error' // 确保 JSX 中使用的变量被正确识别
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"jsx": "preserve",
|
||||
"jsxFactory": "h",
|
||||
"jsxFragmentFactory": "Fragment",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
"devDependencies": {
|
||||
"@rushstack/eslint-patch": "^1.8.0",
|
||||
"@vitejs/plugin-vue": "^5.0.5",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
||||
"@vue/eslint-config-prettier": "^9.0.0",
|
||||
"@vue/runtime-dom": "^3.5.13",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-vue": "^9.23.0",
|
||||
"husky": "^8.0.0",
|
||||
|
||||
@@ -2,11 +2,19 @@ import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||
import svgLoader from 'vite-svg-loader'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue(), svgLoader()],
|
||||
plugins: [
|
||||
vue(),
|
||||
vueJsx({
|
||||
transformOn: true,
|
||||
optimize: true
|
||||
}),
|
||||
svgLoader()
|
||||
],
|
||||
base: '/im',
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Reference in New Issue
Block a user