create-bubbles 0.1.13 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -8
- package/package.json +3 -3
- package/template-nextjs-vinext-eslint/.dockerignore +0 -3
- package/template-nextjs-vinext-eslint/.vscode/settings.json +0 -53
- package/template-nextjs-vinext-eslint/Dockerfile +0 -21
- package/template-nextjs-vinext-eslint/README.md +0 -100
- package/template-nextjs-vinext-eslint/commitlint.config.js +0 -1
- package/template-nextjs-vinext-eslint/docker-compose.yaml +0 -22
- package/template-nextjs-vinext-eslint/eslint.config.js +0 -20
- package/template-nextjs-vinext-eslint/lefthook.yml +0 -11
- package/template-nextjs-vinext-eslint/next.config.ts +0 -8
- package/template-nextjs-vinext-eslint/nginx.conf +0 -14
- package/template-nextjs-vinext-eslint/package.json +0 -50
- package/template-nextjs-vinext-eslint/pnpm-workspace.yaml +0 -7
- package/template-nextjs-vinext-eslint/public/file.svg +0 -1
- package/template-nextjs-vinext-eslint/public/globe.svg +0 -1
- package/template-nextjs-vinext-eslint/public/logo-white.svg +0 -128
- package/template-nextjs-vinext-eslint/public/next.svg +0 -1
- package/template-nextjs-vinext-eslint/public/vercel.svg +0 -1
- package/template-nextjs-vinext-eslint/public/window.svg +0 -1
- package/template-nextjs-vinext-eslint/src/app/_components/Header/header.module.css +0 -0
- package/template-nextjs-vinext-eslint/src/app/_components/Header/header.tsx +0 -7
- package/template-nextjs-vinext-eslint/src/app/_components/Main/index.tsx +0 -13
- package/template-nextjs-vinext-eslint/src/app/antd-provider.tsx +0 -30
- package/template-nextjs-vinext-eslint/src/app/icon.svg +0 -26
- package/template-nextjs-vinext-eslint/src/app/layout.tsx +0 -68
- package/template-nextjs-vinext-eslint/src/app/page.module.css +0 -141
- package/template-nextjs-vinext-eslint/src/app/page.tsx +0 -43
- package/template-nextjs-vinext-eslint/src/app/uno-css.tsx +0 -7
- package/template-nextjs-vinext-eslint/src/assets/icon/logo-white.svg +0 -128
- package/template-nextjs-vinext-eslint/src/assets/icon/logo.svg +0 -26
- package/template-nextjs-vinext-eslint/src/assets/image/QR.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/banner_1.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/banner_2.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/banner_3.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/banner_4.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/banner_top.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/icon_title_left.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/icon_title_right.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/img.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_COCT.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/207/347/247/221.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/205/264.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/206/266/345/273/272/345/267/245.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/344/270/255/351/223/201.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/344/272/224/345/206/266.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/344/272/244/351/200/232/345/273/272/350/256/276.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/345/273/272/344/270/232.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/345/273/272/347/255/221/347/247/221/345/255/246/351/231/242.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/347/224/265/345/273/272.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/351/223/201/345/273/272.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/345/256/234/351/200/232/344/270/226/347/272/252.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/346/225/260/347/273/264/347/251/272/351/227/264.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/346/226/260/346/230/212/350/276/260/345/273/272/350/256/276.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/346/236/227/345/220/214/346/243/252/345/233/275/351/231/205.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/346/270/235/351/232/206/351/233/206/345/233/242.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/347/273/264/345/241/224/347/247/221/346/212/200.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/350/205/276/350/256/257.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/350/265/233/350/277/252/344/277/241/346/201/257.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/344/272/244/351/200/232/345/244/247/345/255/246.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/344/272/244/351/200/232/350/201/214/344/270/232/345/255/246/351/231/242.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/345/244/247/345/255/246.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/345/267/245/345/225/206/350/201/214/344/270/232/345/255/246/351/231/242.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/345/267/245/347/250/213/350/201/214/344/270/232/346/212/200/346/234/257/345/255/246/351/231/242.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/345/273/272/345/267/245.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/230/277/351/207/214/344/272/221.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/231/206/345/206/233/345/206/233/345/214/273/345/244/247/345/255/246.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/276/231/346/271/226.png +0 -0
- package/template-nextjs-vinext-eslint/src/styles/globals.css +0 -47
- package/template-nextjs-vinext-eslint/src/types/vite-env.d.ts +0 -18
- package/template-nextjs-vinext-eslint/src/utils/env.ts +0 -14
- package/template-nextjs-vinext-eslint/src/utils/index.ts +0 -0
- package/template-nextjs-vinext-eslint/src/utils/request/core/index.ts +0 -182
- package/template-nextjs-vinext-eslint/src/utils/request/core/utils.ts +0 -30
- package/template-nextjs-vinext-eslint/src/utils/request/index.ts +0 -48
- package/template-nextjs-vinext-eslint/tsconfig.json +0 -34
- package/template-nextjs-vinext-eslint/uno.config.ts +0 -8
- package/template-nextjs-vinext-eslint/vite.config.ts +0 -8
- package/template-react-rsbuild-biome/.env +0 -5
- package/template-react-rsbuild-biome/.env.development +0 -1
- package/template-react-rsbuild-biome/.env.production +0 -1
- package/template-react-rsbuild-biome/.prettierignore +0 -34
- package/template-react-rsbuild-biome/.prettierrc +0 -16
- package/template-react-rsbuild-biome/.vscode/settings.json +0 -10
- package/template-react-rsbuild-biome/README.md +0 -29
- package/template-react-rsbuild-biome/biome.json +0 -116
- package/template-react-rsbuild-biome/commitlint.config.js +0 -1
- package/template-react-rsbuild-biome/index.html +0 -7
- package/template-react-rsbuild-biome/lefthook.yml +0 -14
- package/template-react-rsbuild-biome/package.json +0 -42
- package/template-react-rsbuild-biome/public/.gitkeep +0 -0
- package/template-react-rsbuild-biome/rsbuild.config.ts +0 -44
- package/template-react-rsbuild-biome/src/App.tsx +0 -9
- package/template-react-rsbuild-biome/src/assets/font/AlimamaShuHeiTi-Bold.ttf +0 -0
- package/template-react-rsbuild-biome/src/assets/icon/logo.svg +0 -7
- package/template-react-rsbuild-biome/src/components/Loading/PageLoading.tsx +0 -11
- package/template-react-rsbuild-biome/src/env.d.ts +0 -1
- package/template-react-rsbuild-biome/src/index.tsx +0 -18
- package/template-react-rsbuild-biome/src/layout/default/index.tsx +0 -10
- package/template-react-rsbuild-biome/src/pages/home/index.tsx +0 -5
- package/template-react-rsbuild-biome/src/router/index.tsx +0 -38
- package/template-react-rsbuild-biome/src/store/index.ts +0 -0
- package/template-react-rsbuild-biome/src/store/modules/user.ts +0 -11
- package/template-react-rsbuild-biome/src/styles/fonts.scss +0 -4
- package/template-react-rsbuild-biome/src/styles/index.scss +0 -19
- package/template-react-rsbuild-biome/src/styles/variables.scss +0 -4
- package/template-react-rsbuild-biome/src/types/auto-import.d.ts +0 -49
- package/template-react-rsbuild-biome/src/utils/env.ts +0 -10
- package/template-react-rsbuild-biome/src/utils/request/core/index.ts +0 -166
- package/template-react-rsbuild-biome/src/utils/request/core/utils.ts +0 -38
- package/template-react-rsbuild-biome/src/utils/request/index.ts +0 -43
- package/template-react-rsbuild-biome/tsconfig.json +0 -35
- package/template-react-rsbuild-biome/uno.config.ts +0 -8
- package/template-taro-vue-eslint/.editorconfig +0 -12
- package/template-taro-vue-eslint/.env +0 -3
- package/template-taro-vue-eslint/.env.development +0 -5
- package/template-taro-vue-eslint/.env.production +0 -5
- package/template-taro-vue-eslint/.vscode/settings.json +0 -57
- package/template-taro-vue-eslint/babel.config.js +0 -12
- package/template-taro-vue-eslint/commitlint.config.mjs +0 -1
- package/template-taro-vue-eslint/config/dev.ts +0 -27
- package/template-taro-vue-eslint/config/index.ts +0 -129
- package/template-taro-vue-eslint/config/output-root.ts +0 -11
- package/template-taro-vue-eslint/config/prod.ts +0 -39
- package/template-taro-vue-eslint/config/release.ts +0 -113
- package/template-taro-vue-eslint/eslint.config.mjs +0 -22
- package/template-taro-vue-eslint/lefthook.yaml +0 -13
- package/template-taro-vue-eslint/package.json +0 -115
- package/template-taro-vue-eslint/patches/@tarojs__plugin-mini-ci.patch +0 -13
- package/template-taro-vue-eslint/pnpm-workspace.yaml +0 -2
- package/template-taro-vue-eslint/project.config.json +0 -16
- package/template-taro-vue-eslint/src/api/common/upload.ts +0 -53
- package/template-taro-vue-eslint/src/app.config.ts +0 -19
- package/template-taro-vue-eslint/src/app.ts +0 -14
- package/template-taro-vue-eslint/src/assets/image/.gitkeep +0 -0
- package/template-taro-vue-eslint/src/index.html +0 -17
- package/template-taro-vue-eslint/src/pages/example/upload/index.config.ts +0 -3
- package/template-taro-vue-eslint/src/pages/example/upload/index.module.scss +0 -4
- package/template-taro-vue-eslint/src/pages/example/upload/index.vue +0 -71
- package/template-taro-vue-eslint/src/pages/index/index.config.ts +0 -3
- package/template-taro-vue-eslint/src/pages/index/index.module.scss +0 -4
- package/template-taro-vue-eslint/src/pages/index/index.vue +0 -71
- package/template-taro-vue-eslint/src/store/index.ts +0 -10
- package/template-taro-vue-eslint/src/store/modules/user.ts +0 -15
- package/template-taro-vue-eslint/src/store/taroStorage.ts +0 -7
- package/template-taro-vue-eslint/src/styles/index.css +0 -1
- package/template-taro-vue-eslint/src/styles/nut-theme.css +0 -4
- package/template-taro-vue-eslint/src/utils/env.ts +0 -13
- package/template-taro-vue-eslint/src/utils/index.ts +0 -40
- package/template-taro-vue-eslint/src/utils/request/core/index.ts +0 -193
- package/template-taro-vue-eslint/src/utils/request/core/utils.ts +0 -30
- package/template-taro-vue-eslint/src/utils/request/index.ts +0 -73
- package/template-taro-vue-eslint/tsconfig.json +0 -30
- package/template-taro-vue-eslint/types/components.d.ts +0 -12
- package/template-taro-vue-eslint/types/global.d.ts +0 -31
- package/template-taro-vue-eslint/types/vue.d.ts +0 -10
- package/template-taro-vue-eslint/unocss.config.ts +0 -38
- package/template-vp-monorepo-react-nestjs/.oxfmtrc.jsonc +0 -8
- package/template-vp-monorepo-react-nestjs/.oxlintrc.jsonc +0 -3
- package/template-vp-monorepo-react-nestjs/.specs//351/234/200/346/261/202.md +0 -5
- package/template-vp-monorepo-react-nestjs/.vite-hooks/commit-msg +0 -1
- package/template-vp-monorepo-react-nestjs/.vite-hooks/pre-commit +0 -1
- package/template-vp-monorepo-react-nestjs/README.md +0 -29
- package/template-vp-monorepo-react-nestjs/apps/service/.oxlintrc.jsonc +0 -3
- package/template-vp-monorepo-react-nestjs/apps/web/.env +0 -1
- package/template-vp-monorepo-react-nestjs/apps/web/.oxlintrc.jsonc +0 -4
- package/template-vp-monorepo-react-nestjs/apps/web/index.html +0 -13
- package/template-vp-monorepo-react-nestjs/apps/web/package.json +0 -39
- package/template-vp-monorepo-react-nestjs/apps/web/public/favicon.svg +0 -1
- package/template-vp-monorepo-react-nestjs/apps/web/public/icons.svg +0 -24
- package/template-vp-monorepo-react-nestjs/apps/web/src/App.tsx +0 -24
- package/template-vp-monorepo-react-nestjs/apps/web/src/assets/hero.png +0 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/assets/react.svg +0 -1
- package/template-vp-monorepo-react-nestjs/apps/web/src/assets/vite.svg +0 -1
- package/template-vp-monorepo-react-nestjs/apps/web/src/components/Loading/PageLoading.tsx +0 -11
- package/template-vp-monorepo-react-nestjs/apps/web/src/main.tsx +0 -5
- package/template-vp-monorepo-react-nestjs/apps/web/src/pages/home/index.tsx +0 -17
- package/template-vp-monorepo-react-nestjs/apps/web/src/router/index.tsx +0 -25
- package/template-vp-monorepo-react-nestjs/apps/web/src/router/modules/.gitkeep +0 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/styles/index.css +0 -7
- package/template-vp-monorepo-react-nestjs/apps/web/src/types/auto-imports.d.ts +0 -58
- package/template-vp-monorepo-react-nestjs/apps/web/tsconfig.json +0 -32
- package/template-vp-monorepo-react-nestjs/apps/web/vite.config.ts +0 -32
- package/template-vp-monorepo-react-nestjs/commitlint.config.js +0 -0
- package/template-vp-monorepo-react-nestjs/package.json +0 -20
- package/template-vp-monorepo-react-nestjs/packages/utils/README.md +0 -23
- package/template-vp-monorepo-react-nestjs/packages/utils/package.json +0 -39
- package/template-vp-monorepo-react-nestjs/packages/utils/src/index.ts +0 -3
- package/template-vp-monorepo-react-nestjs/packages/utils/tests/index.test.ts +0 -6
- package/template-vp-monorepo-react-nestjs/packages/utils/tsconfig.json +0 -20
- package/template-vp-monorepo-react-nestjs/packages/utils/tsdown.config.ts +0 -9
- package/template-vp-monorepo-react-nestjs/packages/utils/vite.config.ts +0 -7
- package/template-vp-monorepo-react-nestjs/pnpm-workspace.yaml +0 -23
- package/template-vp-monorepo-react-nestjs/tsconfig.json +0 -9
- package/template-vp-monorepo-react-nestjs/vite.config.ts +0 -8
- package/template-vp-react/.env +0 -1
- package/template-vp-react/.oxfmtrc.jsonc +0 -8
- package/template-vp-react/.oxlintrc.jsonc +0 -11
- package/template-vp-react/.vite-hooks/commit-msg +0 -1
- package/template-vp-react/.vite-hooks/pre-commit +0 -1
- package/template-vp-react/.vscode/extensions.json +0 -3
- package/template-vp-react/.vscode/settings.json +0 -11
- package/template-vp-react/commitlint.config.js +0 -0
- package/template-vp-react/index.html +0 -13
- package/template-vp-react/package.json +0 -41
- package/template-vp-react/public/favicon.svg +0 -1
- package/template-vp-react/public/icons.svg +0 -24
- package/template-vp-react/src/App.tsx +0 -24
- package/template-vp-react/src/assets/hero.png +0 -0
- package/template-vp-react/src/assets/react.svg +0 -1
- package/template-vp-react/src/assets/vite.svg +0 -1
- package/template-vp-react/src/components/Loading/PageLoading.tsx +0 -11
- package/template-vp-react/src/main.tsx +0 -5
- package/template-vp-react/src/pages/home/index.tsx +0 -17
- package/template-vp-react/src/router/index.tsx +0 -25
- package/template-vp-react/src/router/modules/.gitkeep +0 -0
- package/template-vp-react/src/styles/index.css +0 -7
- package/template-vp-react/src/types/auto-imports.d.ts +0 -58
- package/template-vp-react/tsconfig.json +0 -32
- package/template-vp-react/vite.config.ts +0 -35
- package/template-vp-react-shadcn/.env +0 -1
- package/template-vp-react-shadcn/.oxfmtrc.jsonc +0 -8
- package/template-vp-react-shadcn/.oxlintrc.jsonc +0 -3
- package/template-vp-react-shadcn/.vite-hooks/commit-msg +0 -1
- package/template-vp-react-shadcn/.vite-hooks/pre-commit +0 -1
- package/template-vp-react-shadcn/.vscode/extensions.json +0 -3
- package/template-vp-react-shadcn/.vscode/settings.json +0 -12
- package/template-vp-react-shadcn/agents.md +0 -44
- package/template-vp-react-shadcn/commitlint.config.js +0 -1
- package/template-vp-react-shadcn/components.json +0 -25
- package/template-vp-react-shadcn/index.html +0 -13
- package/template-vp-react-shadcn/package.json +0 -56
- package/template-vp-react-shadcn/public/favicon.svg +0 -1
- package/template-vp-react-shadcn/public/icons.svg +0 -24
- package/template-vp-react-shadcn/src/App.tsx +0 -24
- package/template-vp-react-shadcn/src/api/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/assets/hero.png +0 -0
- package/template-vp-react-shadcn/src/assets/react.svg +0 -1
- package/template-vp-react-shadcn/src/assets/vite.svg +0 -1
- package/template-vp-react-shadcn/src/components/Loading/PageLoading.tsx +0 -11
- package/template-vp-react-shadcn/src/components/Player/VideoJS/index.tsx +0 -163
- package/template-vp-react-shadcn/src/components/Player/index.ts +0 -7
- package/template-vp-react-shadcn/src/components/ui/button.tsx +0 -67
- package/template-vp-react-shadcn/src/components/ui/sonner.tsx +0 -43
- package/template-vp-react-shadcn/src/components/ui/spinner.tsx +0 -17
- package/template-vp-react-shadcn/src/hooks/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/lib/utils.ts +0 -6
- package/template-vp-react-shadcn/src/main.tsx +0 -5
- package/template-vp-react-shadcn/src/pages/home/index.tsx +0 -96
- package/template-vp-react-shadcn/src/router/index.tsx +0 -25
- package/template-vp-react-shadcn/src/router/modules/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/store/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/styles/index.css +0 -16
- package/template-vp-react-shadcn/src/styles/shadcn.css +0 -127
- package/template-vp-react-shadcn/src/types/auto-imports.d.ts +0 -58
- package/template-vp-react-shadcn/src/utils/env/index.tsx +0 -6
- package/template-vp-react-shadcn/src/utils/request/alova-core/index.ts +0 -276
- package/template-vp-react-shadcn/src/utils/request/alova-core/utils.ts +0 -24
- package/template-vp-react-shadcn/src/utils/request/index.ts +0 -48
- package/template-vp-react-shadcn/src/utils/request/readme.md +0 -176
- package/template-vp-react-shadcn/tsconfig.json +0 -32
- package/template-vp-react-shadcn/vite.config.ts +0 -35
- package/template-vue-rolldown-oxc/.env +0 -4
- package/template-vue-rolldown-oxc/.env.development +0 -1
- package/template-vue-rolldown-oxc/.env.production +0 -1
- package/template-vue-rolldown-oxc/.gitlab-ci.yml +0 -84
- package/template-vue-rolldown-oxc/.oxlintrc.json +0 -4
- package/template-vue-rolldown-oxc/.prettierignore +0 -34
- package/template-vue-rolldown-oxc/.prettierrc +0 -18
- package/template-vue-rolldown-oxc/.vscode/settings.json +0 -11
- package/template-vue-rolldown-oxc/README.md +0 -3
- package/template-vue-rolldown-oxc/commitlint.config.js +0 -1
- package/template-vue-rolldown-oxc/index.html +0 -13
- package/template-vue-rolldown-oxc/lefthook.yml +0 -11
- package/template-vue-rolldown-oxc/package.json +0 -55
- package/template-vue-rolldown-oxc/public/vite.svg +0 -1
- package/template-vue-rolldown-oxc/src/App.vue +0 -17
- package/template-vue-rolldown-oxc/src/assets/icon/vue.svg +0 -1
- package/template-vue-rolldown-oxc/src/components/Icon/svg-icon.vue +0 -29
- package/template-vue-rolldown-oxc/src/layout/default/index.vue +0 -3
- package/template-vue-rolldown-oxc/src/main.ts +0 -13
- package/template-vue-rolldown-oxc/src/router/guard/index.tsx +0 -7
- package/template-vue-rolldown-oxc/src/router/guard/permissionGuard.ts +0 -8
- package/template-vue-rolldown-oxc/src/router/index.tsx +0 -15
- package/template-vue-rolldown-oxc/src/router/modules/index.tsx +0 -31
- package/template-vue-rolldown-oxc/src/store/index.ts +0 -10
- package/template-vue-rolldown-oxc/src/store/modules/user.ts +0 -17
- package/template-vue-rolldown-oxc/src/styles/element-plus-variables.css +0 -4
- package/template-vue-rolldown-oxc/src/styles/font.scss +0 -0
- package/template-vue-rolldown-oxc/src/styles/index.scss +0 -31
- package/template-vue-rolldown-oxc/src/styles/variables.scss +0 -3
- package/template-vue-rolldown-oxc/src/utils/env.ts +0 -10
- package/template-vue-rolldown-oxc/src/utils/request/core/index.ts +0 -166
- package/template-vue-rolldown-oxc/src/utils/request/core/utils.ts +0 -38
- package/template-vue-rolldown-oxc/src/utils/request/index.ts +0 -39
- package/template-vue-rolldown-oxc/src/views/home/index.vue +0 -16
- package/template-vue-rolldown-oxc/src/views/model/index.vue +0 -7
- package/template-vue-rolldown-oxc/src/vite-env.d.ts +0 -13
- package/template-vue-rolldown-oxc/tsconfig.json +0 -36
- package/template-vue-rolldown-oxc/uno.config.ts +0 -10
- package/template-vue-rolldown-oxc/vite.config.ts +0 -51
- package/template-vue-vite-eslint/.env +0 -6
- package/template-vue-vite-eslint/.env.development +0 -2
- package/template-vue-vite-eslint/.env.production +0 -1
- package/template-vue-vite-eslint/README.md +0 -3
- package/template-vue-vite-eslint/commitlint.config.js +0 -1
- package/template-vue-vite-eslint/eslint.config.js +0 -69
- package/template-vue-vite-eslint/index.html +0 -13
- package/template-vue-vite-eslint/lefthook.yml +0 -11
- package/template-vue-vite-eslint/package.json +0 -56
- package/template-vue-vite-eslint/public/vite.svg +0 -1
- package/template-vue-vite-eslint/src/App.vue +0 -19
- package/template-vue-vite-eslint/src/api/index.ts +0 -12
- package/template-vue-vite-eslint/src/assets/icon/computer-data.svg +0 -3
- package/template-vue-vite-eslint/src/assets/icon/cpu.svg +0 -3
- package/template-vue-vite-eslint/src/assets/icon/data-search.svg +0 -3
- package/template-vue-vite-eslint/src/assets/icon/home.svg +0 -3
- package/template-vue-vite-eslint/src/assets/icon/knowledge-graph.svg +0 -3
- package/template-vue-vite-eslint/src/assets/icon/logo.svg +0 -1
- package/template-vue-vite-eslint/src/assets/icon/robot.svg +0 -3
- package/template-vue-vite-eslint/src/assets/image/.gitkeep +0 -0
- package/template-vue-vite-eslint/src/components/Icon/svg-icon.vue +0 -29
- package/template-vue-vite-eslint/src/hooks/chart/lib.ts +0 -57
- package/template-vue-vite-eslint/src/hooks/chart/useEcharts.ts +0 -65
- package/template-vue-vite-eslint/src/layout/default/header/index.vue +0 -12
- package/template-vue-vite-eslint/src/layout/default/index.vue +0 -55
- package/template-vue-vite-eslint/src/main.ts +0 -16
- package/template-vue-vite-eslint/src/router/guard/index.ts +0 -7
- package/template-vue-vite-eslint/src/router/guard/permissionGuard.ts +0 -13
- package/template-vue-vite-eslint/src/router/index.ts +0 -18
- package/template-vue-vite-eslint/src/router/interface.ts +0 -9
- package/template-vue-vite-eslint/src/router/modules/example.ts +0 -21
- package/template-vue-vite-eslint/src/router/modules/index.ts +0 -36
- package/template-vue-vite-eslint/src/store/index.ts +0 -11
- package/template-vue-vite-eslint/src/store/modules/user.ts +0 -20
- package/template-vue-vite-eslint/src/styles/font.scss +0 -0
- package/template-vue-vite-eslint/src/styles/index.scss +0 -29
- package/template-vue-vite-eslint/src/styles/variables.scss +0 -3
- package/template-vue-vite-eslint/src/types/auto-import.d.ts +0 -78
- package/template-vue-vite-eslint/src/types/components.d.ts +0 -18
- package/template-vue-vite-eslint/src/types/vite-env.d.ts +0 -15
- package/template-vue-vite-eslint/src/utils/env.ts +0 -11
- package/template-vue-vite-eslint/src/utils/request/core/index.ts +0 -186
- package/template-vue-vite-eslint/src/utils/request/core/utils.ts +0 -41
- package/template-vue-vite-eslint/src/utils/request/index.ts +0 -42
- package/template-vue-vite-eslint/src/views/example/echart/config.ts +0 -1794
- package/template-vue-vite-eslint/src/views/example/echart/index.vue +0 -22
- package/template-vue-vite-eslint/src/views/example/h-full.vue +0 -24
- package/template-vue-vite-eslint/src/views/example/tree-chart.vue +0 -94
- package/template-vue-vite-eslint/src/views/home/index.vue +0 -25
- package/template-vue-vite-eslint/src/views/login/index.vue +0 -9
- package/template-vue-vite-eslint/tsconfig.json +0 -36
- package/template-vue-vite-eslint/uno.config.ts +0 -21
- package/template-vue-vite-eslint/vite.config.ts +0 -60
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { type AlovaGenerics, type AlovaOptions, createAlova } from 'alova'
|
|
2
|
-
import adapterFetch from 'alova/fetch'
|
|
3
|
-
import { deepMergeObject, isReadableStream } from './utils'
|
|
4
|
-
|
|
5
|
-
interface statusMap {
|
|
6
|
-
success?: number
|
|
7
|
-
unAuthorized?: number
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface codeMap {
|
|
11
|
-
success?: number[]
|
|
12
|
-
unAuthorized?: number[]
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface baseRequestOption<AG extends AlovaGenerics> {
|
|
16
|
-
baseUrl?: string
|
|
17
|
-
timeout?: number
|
|
18
|
-
commonHeaders?: Record<string, string | (() => string)>
|
|
19
|
-
statusMap?: statusMap
|
|
20
|
-
codeMap?: codeMap
|
|
21
|
-
responseDataKey?: string
|
|
22
|
-
responseMessageKey?: string
|
|
23
|
-
isTransformResponse?: boolean
|
|
24
|
-
isShowSuccessMessage?: boolean
|
|
25
|
-
successDefaultMessage?: string
|
|
26
|
-
isShowErrorMessage?: boolean
|
|
27
|
-
errorDefaultMessage?: string
|
|
28
|
-
statesHook?: AlovaOptions<AG>['statesHook']
|
|
29
|
-
successMessageFunc?: (message: string) => void
|
|
30
|
-
errorMessageFunc?: (message: string) => void
|
|
31
|
-
unAuthorizedResponseFunc?: () => void
|
|
32
|
-
requestAdapter?: AlovaOptions<AG>['requestAdapter']
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface CustomConfig {
|
|
36
|
-
isTransformResponse?: boolean
|
|
37
|
-
isShowSuccessMessage?: boolean
|
|
38
|
-
isShowErrorMessage?: boolean
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
type requestOption = baseRequestOption<AlovaGenerics> & CustomConfig
|
|
42
|
-
|
|
43
|
-
export const createInstance = (option: requestOption) => {
|
|
44
|
-
const defaultOption: requestOption = {
|
|
45
|
-
baseUrl: '/',
|
|
46
|
-
timeout: 0,
|
|
47
|
-
statusMap: {
|
|
48
|
-
success: 200,
|
|
49
|
-
unAuthorized: 401,
|
|
50
|
-
},
|
|
51
|
-
codeMap: {
|
|
52
|
-
success: [200],
|
|
53
|
-
unAuthorized: [401],
|
|
54
|
-
},
|
|
55
|
-
responseDataKey: 'data',
|
|
56
|
-
responseMessageKey: 'message',
|
|
57
|
-
isTransformResponse: true,
|
|
58
|
-
isShowSuccessMessage: false,
|
|
59
|
-
successDefaultMessage: '操作成功',
|
|
60
|
-
isShowErrorMessage: true,
|
|
61
|
-
errorDefaultMessage: '服务异常',
|
|
62
|
-
requestAdapter: adapterFetch(),
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const mergeOption: baseRequestOption<AlovaGenerics> & CustomConfig = deepMergeObject(
|
|
66
|
-
defaultOption,
|
|
67
|
-
option,
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
const instance = createAlova({
|
|
71
|
-
baseURL: mergeOption.baseUrl,
|
|
72
|
-
timeout: mergeOption.timeout,
|
|
73
|
-
statesHook: mergeOption?.statesHook,
|
|
74
|
-
requestAdapter: mergeOption.requestAdapter as AlovaOptions<AlovaGenerics>['requestAdapter'],
|
|
75
|
-
beforeRequest: async (method) => {
|
|
76
|
-
for (const [key, value] of Object.entries(option?.commonHeaders ?? {})) {
|
|
77
|
-
method.config.headers[key] = typeof value === 'function' ? value() : value
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
responded: {
|
|
81
|
-
onSuccess: async (response) => {
|
|
82
|
-
if (!mergeOption?.isTransformResponse) return response
|
|
83
|
-
const { status } = response
|
|
84
|
-
|
|
85
|
-
// 判断响应类型:如果使用 adapterFetch,response.data 是可读流,则调用 json();否则直接使用 response.data
|
|
86
|
-
const data =
|
|
87
|
-
response?.body && isReadableStream(response.body)
|
|
88
|
-
? await response.json() // adapterFetch 的响应,使用 json() 解析可读流
|
|
89
|
-
: response.data // 其他适配器的响应
|
|
90
|
-
// 不成功的情况
|
|
91
|
-
if (status !== mergeOption.statusMap?.success) {
|
|
92
|
-
// 如果后端使用status 字段来表示未授权,则返回401
|
|
93
|
-
if (mergeOption?.statusMap?.unAuthorized === status) {
|
|
94
|
-
mergeOption?.unAuthorizedResponseFunc?.()
|
|
95
|
-
}
|
|
96
|
-
return Promise.reject(response)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const {
|
|
100
|
-
responseDataKey,
|
|
101
|
-
codeMap,
|
|
102
|
-
isShowSuccessMessage,
|
|
103
|
-
responseMessageKey,
|
|
104
|
-
isShowErrorMessage,
|
|
105
|
-
} = mergeOption
|
|
106
|
-
const {
|
|
107
|
-
code,
|
|
108
|
-
[responseDataKey as string]: responseData,
|
|
109
|
-
[responseMessageKey as string]: responseMessage,
|
|
110
|
-
} = data
|
|
111
|
-
if (!codeMap?.success?.includes(+code)) {
|
|
112
|
-
// code unAuthorized 处理
|
|
113
|
-
if (codeMap?.unAuthorized?.includes(+code)) {
|
|
114
|
-
mergeOption?.unAuthorizedResponseFunc?.()
|
|
115
|
-
return Promise.reject(response)
|
|
116
|
-
}
|
|
117
|
-
// 其他错误直接打印msg
|
|
118
|
-
|
|
119
|
-
const errorMessage = data[responseMessageKey as string] ?? mergeOption.errorDefaultMessage
|
|
120
|
-
if (isShowErrorMessage) mergeOption?.errorMessageFunc?.(errorMessage)
|
|
121
|
-
return Promise.reject(response)
|
|
122
|
-
}
|
|
123
|
-
if (isShowSuccessMessage)
|
|
124
|
-
mergeOption?.successMessageFunc?.(responseMessage ?? mergeOption.successDefaultMessage)
|
|
125
|
-
return responseData
|
|
126
|
-
},
|
|
127
|
-
onError: (error) => {
|
|
128
|
-
if (mergeOption?.isShowErrorMessage)
|
|
129
|
-
mergeOption.errorMessageFunc?.(
|
|
130
|
-
error.response?.data?.message ?? mergeOption?.errorDefaultMessage,
|
|
131
|
-
)
|
|
132
|
-
},
|
|
133
|
-
// onComplete: (_method) => {},
|
|
134
|
-
},
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
return instance
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// 🚀 创建双重调用实例的工厂函数
|
|
141
|
-
export const createDualCallInstance = (baseConfig: baseRequestOption<AlovaGenerics>) => {
|
|
142
|
-
// 创建默认实例
|
|
143
|
-
const defaultInstance = createInstance(baseConfig)
|
|
144
|
-
|
|
145
|
-
// 双重调用函数
|
|
146
|
-
const dualInstance = (option?: CustomConfig) => {
|
|
147
|
-
if (option) {
|
|
148
|
-
// 合并配置并创建新实例
|
|
149
|
-
const mergedConfig = { ...baseConfig, ...option }
|
|
150
|
-
return createInstance(mergedConfig)
|
|
151
|
-
}
|
|
152
|
-
return defaultInstance
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// 🎯 直接绑定 HTTP 方法,无需复杂类型注释
|
|
156
|
-
dualInstance.Get = defaultInstance.Get.bind(defaultInstance)
|
|
157
|
-
dualInstance.Post = defaultInstance.Post.bind(defaultInstance)
|
|
158
|
-
dualInstance.Put = defaultInstance.Put.bind(defaultInstance)
|
|
159
|
-
dualInstance.Delete = defaultInstance.Delete.bind(defaultInstance)
|
|
160
|
-
dualInstance.Patch = defaultInstance.Patch.bind(defaultInstance)
|
|
161
|
-
dualInstance.Head = defaultInstance.Head.bind(defaultInstance)
|
|
162
|
-
dualInstance.Options = defaultInstance.Options.bind(defaultInstance)
|
|
163
|
-
dualInstance.Request = defaultInstance.Request.bind(defaultInstance)
|
|
164
|
-
|
|
165
|
-
return dualInstance
|
|
166
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export const deepMergeObject = <T = any>(source: T, target: Partial<T>): T => {
|
|
2
|
-
const isObject = (obj: any): obj is Record<string, any> =>
|
|
3
|
-
obj && typeof obj === 'object' && !Array.isArray(obj)
|
|
4
|
-
|
|
5
|
-
const merge = (src: any, tgt: any): any => {
|
|
6
|
-
if (isObject(src) && isObject(tgt)) {
|
|
7
|
-
Object.keys(tgt).forEach((key) => {
|
|
8
|
-
if (isObject(tgt[key])) {
|
|
9
|
-
src[key] = merge(src[key] || {}, tgt[key])
|
|
10
|
-
} else {
|
|
11
|
-
src[key] = tgt[key]
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
}
|
|
15
|
-
return src
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return merge({ ...source }, target)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 判断一个变量是不是可读流
|
|
23
|
-
* @param data
|
|
24
|
-
*/
|
|
25
|
-
export const isReadableStream = (data: unknown): boolean => {
|
|
26
|
-
if (!(data instanceof ReadableStream)) {
|
|
27
|
-
return false
|
|
28
|
-
}
|
|
29
|
-
if (typeof data.locked !== 'boolean') return false
|
|
30
|
-
|
|
31
|
-
const instanceFunc = ['cancel', 'getReader', 'pipeThrough', 'pipeTo', 'tee'] as const
|
|
32
|
-
|
|
33
|
-
for (const func of instanceFunc) {
|
|
34
|
-
if (typeof data[func] !== 'function') return false
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return true
|
|
38
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { envVariables } from '../env'
|
|
2
|
-
import { createDualCallInstance } from './core'
|
|
3
|
-
import { router } from '@/router'
|
|
4
|
-
import { message } from 'antd'
|
|
5
|
-
import 'element-plus/es/components/message/style/css'
|
|
6
|
-
import vueHook from 'alova/vue'
|
|
7
|
-
import { axiosRequestAdapter } from '@alova/adapter-axios'
|
|
8
|
-
|
|
9
|
-
// 🎯 获取基础配置
|
|
10
|
-
const getBaseConfig = (): Parameters<typeof createDualCallInstance>[0] => {
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
baseUrl: `/${envVariables.PUBLIC_API_AFFIX}`,
|
|
14
|
-
statusMap: {
|
|
15
|
-
success: 200,
|
|
16
|
-
unAuthorized: 401,
|
|
17
|
-
},
|
|
18
|
-
codeMap: {
|
|
19
|
-
success: [200],
|
|
20
|
-
},
|
|
21
|
-
responseDataKey: 'data',
|
|
22
|
-
responseMessageKey: 'msg',
|
|
23
|
-
commonHeaders: {
|
|
24
|
-
},
|
|
25
|
-
successMessageFunc: (msg: string) => {
|
|
26
|
-
message.success(msg)
|
|
27
|
-
},
|
|
28
|
-
errorMessageFunc: (msg: string) => {
|
|
29
|
-
message.error(msg)
|
|
30
|
-
},
|
|
31
|
-
unAuthorizedResponseFunc: () => {
|
|
32
|
-
router.navigate('/login')
|
|
33
|
-
message.error('登录过期或未登录')
|
|
34
|
-
},
|
|
35
|
-
statesHook: vueHook,
|
|
36
|
-
requestAdapter: axiosRequestAdapter(),
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// 🚀 使用 alova-core 的双重调用功能,超级简洁!
|
|
41
|
-
const alovaRequest = createDualCallInstance(getBaseConfig())
|
|
42
|
-
|
|
43
|
-
export default alovaRequest
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"lib": ["DOM", "ES2020"],
|
|
4
|
-
"jsx": "react-jsx",
|
|
5
|
-
"target": "ES2020",
|
|
6
|
-
"noEmit": true,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"useDefineForClassFields": true,
|
|
9
|
-
|
|
10
|
-
/* modules */
|
|
11
|
-
"module": "ESNext",
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"resolveJsonModule": true,
|
|
14
|
-
"moduleResolution": "Bundler",
|
|
15
|
-
"allowImportingTsExtensions": true,
|
|
16
|
-
|
|
17
|
-
/* type checking */
|
|
18
|
-
"strict": true,
|
|
19
|
-
"noUnusedLocals": true,
|
|
20
|
-
"noUnusedParameters": true,
|
|
21
|
-
|
|
22
|
-
"baseUrl": ".",
|
|
23
|
-
"paths": {
|
|
24
|
-
"@/*": ["src/*"]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"include": [
|
|
28
|
-
"src/**/*.ts",
|
|
29
|
-
"src/**/*.d.ts",
|
|
30
|
-
"src/**/*.tsx",
|
|
31
|
-
"src/types/**/*.d.ts",
|
|
32
|
-
"src/types/**/*.ts"
|
|
33
|
-
],
|
|
34
|
-
"exclude": ["node_modules", "dist", "**/*.js"]
|
|
35
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Disable the default formatter, use eslint instead
|
|
3
|
-
"oxc.enable": false,
|
|
4
|
-
"biome.enabled": false,
|
|
5
|
-
"prettier.enable": false,
|
|
6
|
-
"editor.formatOnSave": false,
|
|
7
|
-
|
|
8
|
-
// Auto fix
|
|
9
|
-
"editor.codeActionsOnSave": {
|
|
10
|
-
"source.fixAll.eslint": "explicit",
|
|
11
|
-
"source.organizeImports": "never"
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
// Silent the stylistic rules in your IDE, but still auto fix them
|
|
15
|
-
"eslint.rules.customizations": [
|
|
16
|
-
{ "rule": "style/*", "severity": "off", "fixable": true },
|
|
17
|
-
{ "rule": "format/*", "severity": "off", "fixable": true },
|
|
18
|
-
{ "rule": "*-indent", "severity": "off", "fixable": true },
|
|
19
|
-
{ "rule": "*-spacing", "severity": "off", "fixable": true },
|
|
20
|
-
{ "rule": "*-spaces", "severity": "off", "fixable": true },
|
|
21
|
-
{ "rule": "*-order", "severity": "off", "fixable": true },
|
|
22
|
-
{ "rule": "*-dangle", "severity": "off", "fixable": true },
|
|
23
|
-
{ "rule": "*-newline", "severity": "off", "fixable": true },
|
|
24
|
-
{ "rule": "*quotes", "severity": "off", "fixable": true },
|
|
25
|
-
{ "rule": "*semi", "severity": "off", "fixable": true }
|
|
26
|
-
],
|
|
27
|
-
|
|
28
|
-
// Enable eslint for all supported languages
|
|
29
|
-
"eslint.validate": [
|
|
30
|
-
"javascript",
|
|
31
|
-
"javascriptreact",
|
|
32
|
-
"typescript",
|
|
33
|
-
"typescriptreact",
|
|
34
|
-
"vue",
|
|
35
|
-
"html",
|
|
36
|
-
"markdown",
|
|
37
|
-
"json",
|
|
38
|
-
"json5",
|
|
39
|
-
"jsonc",
|
|
40
|
-
"yaml",
|
|
41
|
-
"toml",
|
|
42
|
-
"xml",
|
|
43
|
-
"gql",
|
|
44
|
-
"graphql",
|
|
45
|
-
"astro",
|
|
46
|
-
"svelte",
|
|
47
|
-
"css",
|
|
48
|
-
"less",
|
|
49
|
-
"scss",
|
|
50
|
-
"pcss",
|
|
51
|
-
"postcss"
|
|
52
|
-
],
|
|
53
|
-
"cSpell.words": [
|
|
54
|
-
"Alova",
|
|
55
|
-
"tarojs"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// babel-preset-taro 更多选项和默认值:
|
|
2
|
-
// https://docs.taro.zone/docs/next/babel-config
|
|
3
|
-
module.exports = {
|
|
4
|
-
presets: [
|
|
5
|
-
['taro', {
|
|
6
|
-
framework: 'vue3',
|
|
7
|
-
ts: true,
|
|
8
|
-
compiler: 'webpack5',
|
|
9
|
-
useBuiltIns: process.env.TARO_ENV === 'h5' ? 'usage' : false
|
|
10
|
-
}]
|
|
11
|
-
]
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default { extends: ["@commitlint/config-conventional"] };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { UserConfigExport } from '@tarojs/cli'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
logger: {
|
|
5
|
-
quiet: false,
|
|
6
|
-
stats: true,
|
|
7
|
-
},
|
|
8
|
-
mini: {},
|
|
9
|
-
h5: {
|
|
10
|
-
devServer: {
|
|
11
|
-
open: false,
|
|
12
|
-
port: 9970,
|
|
13
|
-
proxy: {
|
|
14
|
-
[`/${process.env.TARO_APP_API_AFFIX}`]: {
|
|
15
|
-
target: process.env.TARO_APP_API_URL,
|
|
16
|
-
changeOrigin: true,
|
|
17
|
-
secure: false,
|
|
18
|
-
},
|
|
19
|
-
[`/${process.env.TARO_APP_UPLOAD_API_AFFIX}`]: {
|
|
20
|
-
target: process.env.TARO_APP_API_URL,
|
|
21
|
-
changeOrigin: true,
|
|
22
|
-
secure: false,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
} satisfies UserConfigExport<'webpack5'>
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import type { UserConfigExport } from '@tarojs/cli'
|
|
2
|
-
import process from 'node:process'
|
|
3
|
-
import NutUIResolver from '@nutui/auto-import-resolver'
|
|
4
|
-
import { defineConfig } from '@tarojs/cli'
|
|
5
|
-
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'
|
|
6
|
-
import UnoCSS from 'unocss/webpack'
|
|
7
|
-
import Components from 'unplugin-vue-components/webpack'
|
|
8
|
-
import devConfig from './dev'
|
|
9
|
-
import { outputRootMap } from './output-root'
|
|
10
|
-
import prodConfig from './prod'
|
|
11
|
-
import { CIPluginFn } from './release'
|
|
12
|
-
|
|
13
|
-
// https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数
|
|
14
|
-
export default defineConfig<'webpack5'>(async (merge, { command, mode }) => {
|
|
15
|
-
const baseConfig: UserConfigExport<'webpack5'> = {
|
|
16
|
-
projectName: 'myApp',
|
|
17
|
-
date: '2026-2-24',
|
|
18
|
-
designWidth: (input: any) => {
|
|
19
|
-
// 配置 NutUI 375 尺寸
|
|
20
|
-
if (input?.file?.replace(/\\+/g, '/').indexOf('@nutui') > -1) {
|
|
21
|
-
return 375
|
|
22
|
-
}
|
|
23
|
-
// 全局使用 Taro 默认的 750 尺寸
|
|
24
|
-
return 750
|
|
25
|
-
},
|
|
26
|
-
deviceRatio: {
|
|
27
|
-
640: 2.34 / 2,
|
|
28
|
-
750: 1,
|
|
29
|
-
375: 2,
|
|
30
|
-
828: 1.81 / 2,
|
|
31
|
-
},
|
|
32
|
-
sourceRoot: 'src',
|
|
33
|
-
outputRoot: outputRootMap[process.env.TARO_ENV] || 'dist/other',
|
|
34
|
-
plugins: [
|
|
35
|
-
'@tarojs/plugin-generator',
|
|
36
|
-
'@tarojs/plugin-html',
|
|
37
|
-
['@tarojs/plugin-mini-ci', CIPluginFn],
|
|
38
|
-
],
|
|
39
|
-
defineConstants: {
|
|
40
|
-
},
|
|
41
|
-
copy: {
|
|
42
|
-
patterns: [
|
|
43
|
-
],
|
|
44
|
-
options: {
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
framework: 'vue3',
|
|
48
|
-
compiler: 'webpack5',
|
|
49
|
-
cache: {
|
|
50
|
-
enable: false, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
|
|
51
|
-
},
|
|
52
|
-
mini: {
|
|
53
|
-
postcss: {
|
|
54
|
-
pxtransform: {
|
|
55
|
-
enable: true,
|
|
56
|
-
config: {
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
cssModules: {
|
|
61
|
-
enable: true, // 默认为 false,如需使用 css modules 功能,则设为 true
|
|
62
|
-
config: {
|
|
63
|
-
namingPattern: 'module', // 转换模式,取值为 global/module
|
|
64
|
-
generateScopedName: '[name]__[local]___[hash:base64:5]',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
webpackChain(chain) {
|
|
69
|
-
chain.resolve.plugin('tsconfig-paths').use(TsconfigPathsPlugin)
|
|
70
|
-
chain.plugin('unplugin-vue-components').use(Components({
|
|
71
|
-
resolvers: [NutUIResolver({ taro: true })],
|
|
72
|
-
dts: './types/components.d.ts',
|
|
73
|
-
}))
|
|
74
|
-
chain.plugin('unocss').use(UnoCSS())
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
h5: {
|
|
78
|
-
publicPath: '/',
|
|
79
|
-
staticDirectory: 'static',
|
|
80
|
-
output: {
|
|
81
|
-
filename: 'js/[name].[hash:8].js',
|
|
82
|
-
chunkFilename: 'js/[name].[chunkhash:8].js',
|
|
83
|
-
},
|
|
84
|
-
miniCssExtractPluginOption: {
|
|
85
|
-
ignoreOrder: true,
|
|
86
|
-
filename: 'css/[name].[hash].css',
|
|
87
|
-
chunkFilename: 'css/[name].[chunkhash].css',
|
|
88
|
-
},
|
|
89
|
-
postcss: {
|
|
90
|
-
autoprefixer: {
|
|
91
|
-
enable: true,
|
|
92
|
-
config: {},
|
|
93
|
-
},
|
|
94
|
-
cssModules: {
|
|
95
|
-
enable: true, // 默认为 false,如需使用 css modules 功能,则设为 true
|
|
96
|
-
config: {
|
|
97
|
-
namingPattern: 'module', // 转换模式,取值为 global/module
|
|
98
|
-
generateScopedName: '[name]__[local]___[hash:base64:5]',
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
webpackChain(chain) {
|
|
103
|
-
chain.resolve.plugin('tsconfig-paths').use(TsconfigPathsPlugin)
|
|
104
|
-
chain.plugin('unplugin-vue-components').use(Components({
|
|
105
|
-
resolvers: [NutUIResolver({ taro: true })],
|
|
106
|
-
dts: './types/components.d.ts',
|
|
107
|
-
}))
|
|
108
|
-
chain.plugin('unocss').use(UnoCSS())
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
rn: {
|
|
112
|
-
appName: 'taroDemo',
|
|
113
|
-
postcss: {
|
|
114
|
-
cssModules: {
|
|
115
|
-
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
process.env.BROWSERSLIST_ENV = process.env.NODE_ENV
|
|
122
|
-
|
|
123
|
-
if (process.env.NODE_ENV === 'development') {
|
|
124
|
-
// 本地开发构建配置(不混淆压缩)
|
|
125
|
-
return merge({}, baseConfig, devConfig)
|
|
126
|
-
}
|
|
127
|
-
// 生产构建配置(默认开启压缩混淆等)
|
|
128
|
-
return merge({}, baseConfig, prodConfig)
|
|
129
|
-
})
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { UserConfigExport } from '@tarojs/cli'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
mini: {},
|
|
5
|
-
h5: {
|
|
6
|
-
compile: {
|
|
7
|
-
include: [
|
|
8
|
-
// 确保产物为 es5
|
|
9
|
-
filename => /node_modules\/(?!(@babel|core-js|style-loader|css-loader|react|react-dom))/.test(filename),
|
|
10
|
-
],
|
|
11
|
-
},
|
|
12
|
-
/**
|
|
13
|
-
* WebpackChain 插件配置
|
|
14
|
-
* @docs https://github.com/neutrinojs/webpack-chain
|
|
15
|
-
*/
|
|
16
|
-
// webpackChain (chain) {
|
|
17
|
-
// /**
|
|
18
|
-
// * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。
|
|
19
|
-
// * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer
|
|
20
|
-
// */
|
|
21
|
-
// chain.plugin('analyzer')
|
|
22
|
-
// .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
|
|
23
|
-
// /**
|
|
24
|
-
// * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。
|
|
25
|
-
// * @docs https://github.com/chrisvfritz/prerender-spa-plugin
|
|
26
|
-
// */
|
|
27
|
-
// const path = require('path')
|
|
28
|
-
// const Prerender = require('prerender-spa-plugin')
|
|
29
|
-
// const staticDir = path.join(__dirname, '..', 'dist')
|
|
30
|
-
// chain
|
|
31
|
-
// .plugin('prerender')
|
|
32
|
-
// .use(new Prerender({
|
|
33
|
-
// staticDir,
|
|
34
|
-
// routes: [ '/pages/index/index' ],
|
|
35
|
-
// postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') })
|
|
36
|
-
// }))
|
|
37
|
-
// }
|
|
38
|
-
},
|
|
39
|
-
} satisfies UserConfigExport<'webpack5'>
|