请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。
vite是按需编译,运行时点击某个未编译页面会先编译后加载,导致显示较慢,发行后无此问题。
编译器版本:4.24(vue3)
正在编译中...
Port 5173 is in use, trying another one...
vite v5.2.8 dev server running at:
➜ Local: http://localhost:5174/
➜ Network: http://10.210.63.177:5174/
ready in 5814ms.
✘ [ERROR] Unbalanced delimiter found in string [plugin uni:dep-scan]
node_modules/xregexp/src/addons/matchrecursive.js:176:22:
176 │ throw new Error('Unbalanced delimiter found in string');
╵ ^
at Function.XRegExp.matchRecursive (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/xregexp/src/addons/matchrecursive.js:176:23)
at matchReplacePass (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/@dcloudio/uni-cli-shared/lib/preprocess/lib/preprocess.js:310:27)
at replaceRecursive (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/@dcloudio/uni-cli-shared/lib/preprocess/lib/preprocess.js:340:10)
at preprocessor (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/@dcloudio/uni-cli-shared/lib/preprocess/lib/preprocess.js:165:10)
at preprocess (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/@dcloudio/uni-cli-shared/lib/preprocess/lib/preprocess.js:89:10)
at preJs (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/@dcloudio/uni-cli-shared/dist/preprocess/index.js:13:12)
at /Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/@dcloudio/uni-h5-vite/dist/plugin/esbuild/esbuildPrePlugin.js:22:63
at requestCallbacks.on-load (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/esbuild/lib/main.js:1435:28)
at handleRequest (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/esbuild/lib/main.js:732:17)
at handleIncomingPacket (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/esbuild/lib/main.js:757:7)
This error came from the "onLoad" callback registered here:
node_modules/@dcloudio/uni-h5-vite/dist/plugin/esbuild/esbuildPrePlugin.js:15:18:
15 │ build.onLoad({ filter: exports.JS_TYPES_RE }, ({ path: id }) => {
╵ ~~~~~~
at setup (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/@dcloudio/uni-h5-vite/dist/plugin/esbuild/esbuildPrePlugin.js:15:19)
at handlePlugins (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/esbuild/lib/main.js:1293:21)
at buildOrContextImpl (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/esbuild/lib/main.js:979:5)
at Object.buildOrContext (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/esbuild/lib/main.js:788:5)
at /Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/esbuild/lib/main.js:2224:68
at new Promise (<anonymous>)
at Object.context (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/esbuild/lib/main.js:2224:27)
at Object.context (/Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/esbuild/lib/main.js:2048:58)
at prepareEsbuildOptimizerRun (file:///Users/xiezhenggen/AndroidStudioProjects/HBuilderProjects/2024/07/my-vue3-07-24/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:52821:35)
10:21:46 [vite] Build failed with 1 error:
node_modules/xregexp/src/addons/matchrecursive.js:176:22: ERROR: [plugin: uni:dep-scan] Unbalanced delimiter found in string
夫子仰慕者 (作者)
好的,我试试
2024-07-29 17:32
夫子仰慕者 (作者)
那后期uniapp会修复吗
2024-07-29 17:36
BFC
回复 夫子仰慕者: 后期会修复
2024-07-29 17:45
7***@qq.com
回复 BFC: 能说清楚下是哪部分注释吗
2024-08-07 15:54
BFC
回复 7***@qq.com: #ifdef, #ifndef, #endif 这类的注释
2024-08-07 15:59
夫子仰慕者 (作者)
回复 BFC: 那这个问题,多久会修复呢
2024-08-08 08:42