提交 e2bfcc8a 作者: 方治民

fix: 修复 easycom 组件导入在 APP 下无效问题

上级 90f1f140
import type { Plugin } from 'vite' import type { Plugin } from 'vite'
import path from 'path'
// https://github.com/antfu/unplugin-auto-import // https://github.com/antfu/unplugin-auto-import
import AutoImport from 'unplugin-auto-import/vite' import AutoImport from 'unplugin-auto-import/vite'
...@@ -21,5 +22,13 @@ export function configAutoImportPlugin(): Plugin { ...@@ -21,5 +22,13 @@ export function configAutoImportPlugin(): Plugin {
'@/common/message': ['Message'], '@/common/message': ['Message'],
}, },
], ],
resolvers: [
(name) => {
// FIX: 修复 easycom 在 APP 下不生效问题
if (name.startsWith('fui-')) {
return path.resolve(__dirname, `src/components/firstui/${name}/${name}.vue`).replaceAll('\\', '/')
}
},
],
}) })
} }
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
"dayjs": "^1.11.5", "dayjs": "^1.11.5",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"pinia": "^2.0.22", "pinia": "^2.0.23",
"qs": "~6.9.7", "qs": "~6.9.7",
"vue": "^3.2.40", "vue": "^3.2.40",
"vue-i18n": "^9.2.2", "vue-i18n": "^9.2.2",
......
...@@ -45,7 +45,7 @@ specifiers: ...@@ -45,7 +45,7 @@ specifiers:
mockjs: ^1.1.0 mockjs: ^1.1.0
npm-run-all: ^4.1.5 npm-run-all: ^4.1.5
picocolors: ^1.0.0 picocolors: ^1.0.0
pinia: ^2.0.22 pinia: ^2.0.23
pont-engine: ^1.4.0 pont-engine: ^1.4.0
postcss: ^8.4.17 postcss: ^8.4.17
postcss-html: ^1.5.0 postcss-html: ^1.5.0
...@@ -89,7 +89,7 @@ dependencies: ...@@ -89,7 +89,7 @@ dependencies:
dayjs: 1.11.5 dayjs: 1.11.5
lodash-es: 4.17.21 lodash-es: 4.17.21
mockjs: 1.1.0 mockjs: 1.1.0
pinia: 2.0.22_bfjwoga25wxjazzogo7o372nwq pinia: 2.0.23_bfjwoga25wxjazzogo7o372nwq
qs: 6.9.7 qs: 6.9.7
vue: 3.2.40 vue: 3.2.40
vue-i18n: 9.2.2_vue@3.2.40 vue-i18n: 9.2.2_vue@3.2.40
...@@ -729,7 +729,7 @@ packages: ...@@ -729,7 +729,7 @@ packages:
fs-extra: 10.1.0 fs-extra: 10.1.0
hash-sum: 2.0.0 hash-sum: 2.0.0
jsonc-parser: 3.2.0 jsonc-parser: 3.2.0
magic-string: 0.26.6 magic-string: 0.26.7
merge: 2.1.1 merge: 2.1.1
mime: 3.0.0 mime: 3.0.0
module-alias: 2.2.2 module-alias: 2.2.2
...@@ -954,7 +954,7 @@ packages: ...@@ -954,7 +954,7 @@ packages:
'@vue/compiler-sfc': 3.2.40 '@vue/compiler-sfc': 3.2.40
'@vue/shared': 3.2.40 '@vue/shared': 3.2.40
debug: 4.3.4 debug: 4.3.4
magic-string: 0.26.6 magic-string: 0.26.7
transitivePeerDependencies: transitivePeerDependencies:
- postcss - postcss
- supports-color - supports-color
...@@ -1128,7 +1128,7 @@ packages: ...@@ -1128,7 +1128,7 @@ packages:
cac: 6.7.9 cac: 6.7.9
debug: 4.3.4 debug: 4.3.4
estree-walker: 2.0.2 estree-walker: 2.0.2
express: 4.18.1 express: 4.18.2
fast-glob: 3.2.12 fast-glob: 3.2.12
fs-extra: 10.1.0 fs-extra: 10.1.0
hash-sum: 2.0.0 hash-sum: 2.0.0
...@@ -1577,7 +1577,7 @@ packages: ...@@ -1577,7 +1577,7 @@ packages:
dependencies: dependencies:
'@babel/standalone': 7.19.3 '@babel/standalone': 7.19.3
core-js: 3.25.5 core-js: 3.25.5
magic-string: 0.26.6 magic-string: 0.26.7
regenerator-runtime: 0.13.9 regenerator-runtime: 0.13.9
systemjs: 6.13.0 systemjs: 6.13.0
terser: 5.15.1 terser: 5.15.1
...@@ -1666,8 +1666,8 @@ packages: ...@@ -1666,8 +1666,8 @@ packages:
'@vue/compiler-dom': 3.2.40 '@vue/compiler-dom': 3.2.40
'@vue/shared': 3.2.40 '@vue/shared': 3.2.40
/@vue/devtools-api/6.4.3: /@vue/devtools-api/6.4.4:
resolution: {integrity: sha512-9WCRwdROJvWcHAdyrR7SZMM/qUvllDZnpndHXokThkUsjnJ2xe4/pvsH9FZrxFe22L+JmDKczL79HjLJ7DK9rg==} resolution: {integrity: sha512-Ku31WzpOV/8cruFaXaEZKF81WkNnvCSlBY4eOGtz5WMSdJvX1v1WWlSMGZeqUwPtQ27ZZz7B62erEMq8JDjcXw==}
dev: false dev: false
/@vue/reactivity-transform/3.2.40: /@vue/reactivity-transform/3.2.40:
...@@ -1954,8 +1954,8 @@ packages: ...@@ -1954,8 +1954,8 @@ packages:
resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==}
dev: true dev: true
/body-parser/1.20.0: /body-parser/1.20.1:
resolution: {integrity: sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==} resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==}
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
dependencies: dependencies:
bytes: 3.1.2 bytes: 3.1.2
...@@ -1966,7 +1966,7 @@ packages: ...@@ -1966,7 +1966,7 @@ packages:
http-errors: 2.0.0 http-errors: 2.0.0
iconv-lite: 0.4.24 iconv-lite: 0.4.24
on-finished: 2.4.1 on-finished: 2.4.1
qs: 6.10.3 qs: 6.11.0
raw-body: 2.5.1 raw-body: 2.5.1
type-is: 1.6.18 type-is: 1.6.18
unpipe: 1.0.0 unpipe: 1.0.0
...@@ -3223,13 +3223,13 @@ packages: ...@@ -3223,13 +3223,13 @@ packages:
homedir-polyfill: 1.0.3 homedir-polyfill: 1.0.3
dev: true dev: true
/express/4.18.1: /express/4.18.2:
resolution: {integrity: sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==} resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==}
engines: {node: '>= 0.10.0'} engines: {node: '>= 0.10.0'}
dependencies: dependencies:
accepts: 1.3.8 accepts: 1.3.8
array-flatten: 1.1.1 array-flatten: 1.1.1
body-parser: 1.20.0 body-parser: 1.20.1
content-disposition: 0.5.4 content-disposition: 0.5.4
content-type: 1.0.4 content-type: 1.0.4
cookie: 0.5.0 cookie: 0.5.0
...@@ -3248,7 +3248,7 @@ packages: ...@@ -3248,7 +3248,7 @@ packages:
parseurl: 1.3.3 parseurl: 1.3.3
path-to-regexp: 0.1.7 path-to-regexp: 0.1.7
proxy-addr: 2.0.7 proxy-addr: 2.0.7
qs: 6.10.3 qs: 6.11.0
range-parser: 1.2.1 range-parser: 1.2.1
safe-buffer: 5.2.1 safe-buffer: 5.2.1
send: 0.18.0 send: 0.18.0
...@@ -4380,8 +4380,8 @@ packages: ...@@ -4380,8 +4380,8 @@ packages:
dependencies: dependencies:
sourcemap-codec: 1.4.8 sourcemap-codec: 1.4.8
/magic-string/0.26.6: /magic-string/0.26.7:
resolution: {integrity: sha512-6d+3bFybzyQFJYSoRsl9ZC0wheze8M1LrQC7tNMRqXR4izUTDOLMd9BtSuExK9iAukFh+s5K0WAhc/dlQ+HKYA==} resolution: {integrity: sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==}
engines: {node: '>=12'} engines: {node: '>=12'}
dependencies: dependencies:
sourcemap-codec: 1.4.8 sourcemap-codec: 1.4.8
...@@ -4964,8 +4964,8 @@ packages: ...@@ -4964,8 +4964,8 @@ packages:
engines: {node: '>=6'} engines: {node: '>=6'}
optional: true optional: true
/pinia/2.0.22_bfjwoga25wxjazzogo7o372nwq: /pinia/2.0.23_bfjwoga25wxjazzogo7o372nwq:
resolution: {integrity: sha512-u+b8/BC+tmvo3ACbYO2w5NfxHWFOjvvw9DQnyT0dW8aUMCPRQT5QnfZ5R5W2MzZBMTeZRMQI7V/QFbafmM9QHw==} resolution: {integrity: sha512-N15hFf4o5STrxpNrib1IEb1GOArvPYf1zPvQVRGOO1G1d74Ak0J0lVyalX/SmrzdT4Q0nlEFjbURsmBmIGUR5Q==}
peerDependencies: peerDependencies:
'@vue/composition-api': ^1.4.0 '@vue/composition-api': ^1.4.0
typescript: '>=4.4.4' typescript: '>=4.4.4'
...@@ -4976,7 +4976,7 @@ packages: ...@@ -4976,7 +4976,7 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@vue/devtools-api': 6.4.3 '@vue/devtools-api': 6.4.4
typescript: 4.8.4 typescript: 4.8.4
vue: 3.2.40 vue: 3.2.40
vue-demi: 0.13.11_vue@3.2.40 vue-demi: 0.13.11_vue@3.2.40
...@@ -5201,8 +5201,8 @@ packages: ...@@ -5201,8 +5201,8 @@ packages:
hasBin: true hasBin: true
dev: true dev: true
/qs/6.10.3: /qs/6.11.0:
resolution: {integrity: sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==} resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==}
engines: {node: '>=0.6'} engines: {node: '>=0.6'}
dependencies: dependencies:
side-channel: 1.0.4 side-channel: 1.0.4
...@@ -6157,7 +6157,7 @@ packages: ...@@ -6157,7 +6157,7 @@ packages:
escape-string-regexp: 5.0.0 escape-string-regexp: 5.0.0
fast-glob: 3.2.12 fast-glob: 3.2.12
local-pkg: 0.4.2 local-pkg: 0.4.2
magic-string: 0.26.6 magic-string: 0.26.7
mlly: 0.5.16 mlly: 0.5.16
pathe: 0.3.9 pathe: 0.3.9
scule: 0.3.2 scule: 0.3.2
...@@ -6192,7 +6192,7 @@ packages: ...@@ -6192,7 +6192,7 @@ packages:
'@rollup/pluginutils': 4.2.1 '@rollup/pluginutils': 4.2.1
'@vueuse/core': 8.9.4_vue@3.2.40 '@vueuse/core': 8.9.4_vue@3.2.40
local-pkg: 0.4.2 local-pkg: 0.4.2
magic-string: 0.26.6 magic-string: 0.26.7
unimport: 0.6.8 unimport: 0.6.8
unplugin: 0.9.6 unplugin: 0.9.6
dev: true dev: true
...@@ -6330,7 +6330,7 @@ packages: ...@@ -6330,7 +6330,7 @@ packages:
'@intlify/core-base': 9.2.2 '@intlify/core-base': 9.2.2
'@intlify/shared': 9.2.2 '@intlify/shared': 9.2.2
'@intlify/vue-devtools': 9.2.2 '@intlify/vue-devtools': 9.2.2
'@vue/devtools-api': 6.4.3 '@vue/devtools-api': 6.4.4
vue: 3.2.40 vue: 3.2.40
dev: false dev: false
...@@ -6339,7 +6339,7 @@ packages: ...@@ -6339,7 +6339,7 @@ packages:
peerDependencies: peerDependencies:
vue: ^3.2.0 vue: ^3.2.0
dependencies: dependencies:
'@vue/devtools-api': 6.4.3 '@vue/devtools-api': 6.4.4
vue: 3.2.40 vue: 3.2.40
dev: false dev: false
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"easycom": { "easycom": {
"autoscan": true, "autoscan": true,
"custom": { "custom": {
"fui-(.*)": "@/components/firstui/fui-$1/fui-$1.vue" "^fui-(.*)": "@/components/firstui/fui-$1/fui-$1.vue"
} }
}, },
"globalStyle": { "globalStyle": {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论