refactor: 移除json5支持并更新路由配置

移除vscode对json5的支持配置和相关插件
将路由配置从json5迁移到jsonc格式
更新vite配置中的分包设置
This commit is contained in:
feige996
2025-07-08 16:47:46 +08:00
parent f7154d173c
commit d0b8b5d28d
4 changed files with 6 additions and 9 deletions

View File

@@ -12,7 +12,6 @@
"uni-helper.uni-highlight-vscode",
"uni-helper.uni-ui-snippets-vscode",
"uni-helper.uni-app-snippets-vscode",
"mrmlnc.vscode-json5",
"streetsidesoftware.code-spell-checker",
"foxundermoon.shell-format",
"christian-kohler.path-intellisense"

View File

@@ -54,7 +54,6 @@
"html",
"markdown",
"json",
"json5",
"jsonc",
"yaml",
"toml",

View File

@@ -1,9 +1,9 @@
<route lang="json5" type="page">
<route lang="jsonc" type="page">
{
layout: 'default',
style: {
navigationBarTitleText: '上传-状态一体化',
},
"layout": "default",
"style": {
"navigationBarTitleText": "上传-状态一体化"
}
}
</route>

View File

@@ -60,10 +60,9 @@ export default async ({ command, mode }) => {
plugins: [
UniPages({
exclude: ['**/components/**/**.*'],
routeBlockLang: 'json5', // 虽然设了默认值但是vue文件还是要加上 lang="json5", 这样才能很好地格式化
// homePage 通过 vue 文件的 route-block 的type="home"来设定
// pages 目录为 src/pages分包目录不能配置在pages目录下
// subPackages: ['src/pages-sub'], // 是个数组可以配置多个但是不能为pages里面的目录
subPackages: ['src/pages-sub'], // 是个数组可以配置多个但是不能为pages里面的目录
dts: 'src/types/uni-pages.d.ts',
}),
UniLayouts(),