@moluoxixi/create-app 2.0.443 → 2.0.444

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.
Files changed (187) hide show
  1. package/README.md +0 -2
  2. package/dist/commands/create.js +0 -1
  3. package/dist/core/projectAtom.d.ts +43 -0
  4. package/dist/core/projectAtom.js +146 -0
  5. package/dist/core/projectOutput.d.ts +11 -0
  6. package/dist/core/projectOutput.js +402 -0
  7. package/dist/core/template.js +5 -0
  8. package/dist/generators/project.js +4 -1
  9. package/dist/types/features.d.ts +0 -2
  10. package/dist/types/features.js +0 -2
  11. package/package.json +2 -1
  12. package/templates/common/base/node_modules/.bin/autoprefixer +2 -2
  13. package/templates/common/base/node_modules/.bin/browserslist +4 -4
  14. package/templates/common/base/node_modules/.bin/jiti +4 -4
  15. package/templates/common/base/node_modules/.bin/sass +2 -2
  16. package/templates/common/base/node_modules/.bin/uuid +2 -2
  17. package/templates/common/base/node_modules/.bin/vite +2 -2
  18. package/templates/common/base/node_modules/.bin/yaml +4 -4
  19. package/templates/common/base/package.json +2 -4
  20. package/templates/common/features/eslint/node_modules/.bin/browserslist +4 -4
  21. package/templates/common/features/eslint/node_modules/.bin/eslint +2 -2
  22. package/templates/common/features/eslint/node_modules/.bin/jiti +4 -4
  23. package/templates/common/features/eslint/node_modules/.bin/sass +4 -4
  24. package/templates/common/features/eslint/node_modules/.bin/vite +17 -0
  25. package/templates/common/features/eslint/node_modules/.bin/vitest +4 -4
  26. package/templates/common/features/eslint/node_modules/.bin/yaml +4 -4
  27. package/templates/common/features/husky/node_modules/.bin/commitizen +2 -2
  28. package/templates/common/features/husky/node_modules/.bin/commitlint +2 -2
  29. package/templates/common/features/husky/node_modules/.bin/cz +2 -2
  30. package/templates/common/features/husky/node_modules/.bin/cz-cust +2 -2
  31. package/templates/common/features/husky/node_modules/.bin/cz-customizable +2 -2
  32. package/templates/common/features/husky/node_modules/.bin/git-cz +2 -2
  33. package/templates/react/base/env.d.ts +1 -0
  34. package/templates/react/base/node_modules/.bin/jiti +4 -4
  35. package/templates/react/base/node_modules/.bin/sass +4 -4
  36. package/templates/react/base/node_modules/.bin/vite +4 -4
  37. package/templates/react/base/node_modules/.bin/yaml +4 -4
  38. package/templates/react/features/manualRoutes/tsconfig.base.json +0 -1
  39. package/templates/react/features/pageRoutes/node_modules/.bin/jiti +4 -4
  40. package/templates/react/features/pageRoutes/node_modules/.bin/sass +4 -4
  41. package/templates/react/features/pageRoutes/node_modules/.bin/vite +4 -4
  42. package/templates/react/features/pageRoutes/node_modules/.bin/yaml +4 -4
  43. package/templates/react/features/pageRoutes/package.json +0 -1
  44. package/templates/react/features/pageRoutes/tsconfig.base.json +0 -1
  45. package/templates/react/features/sentry/package.json +1 -3
  46. package/templates/react/features/zustand/tsconfig.base.json +0 -1
  47. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/jiti +4 -4
  48. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/sass +4 -4
  49. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/vite +2 -2
  50. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/yaml +4 -4
  51. package/templates/react/micro-frontends/qiankun/base/package.json +1 -2
  52. package/templates/react/micro-frontends/qiankun/base/tsconfig.base.json +0 -1
  53. package/templates/vue/base/atom.mjs +26 -0
  54. package/templates/vue/base/env.d.ts +1 -0
  55. package/templates/vue/base/node_modules/.bin/jiti +17 -0
  56. package/templates/{react/features/sentry → vue/base}/node_modules/.bin/sass +4 -4
  57. package/templates/vue/{features/sentry → base}/node_modules/.bin/tsx +2 -2
  58. package/templates/vue/base/node_modules/.bin/vite +17 -0
  59. package/templates/vue/base/node_modules/.bin/vue-tsc +2 -2
  60. package/templates/vue/{features/sentry → base}/node_modules/.bin/yaml +4 -4
  61. package/templates/vue/base/package.json +1 -0
  62. package/templates/vue/base/src/types/index.ts +16 -0
  63. package/templates/vue/features/element-plus/atom.mjs +35 -0
  64. package/templates/vue/features/element-plus/node_modules/.bin/parser +4 -4
  65. package/templates/vue/features/element-plus/package.json +3 -2
  66. package/templates/vue/features/element-plus/src/components/SubMenu/src/index.vue +1 -1
  67. package/templates/vue/features/i18n/atom.mjs +11 -0
  68. package/templates/vue/features/pageRoutes/atom.mjs +15 -0
  69. package/templates/vue/features/pageRoutes/node_modules/.bin/jiti +4 -4
  70. package/templates/vue/features/pageRoutes/node_modules/.bin/sass +4 -4
  71. package/templates/vue/features/pageRoutes/node_modules/.bin/vite +4 -4
  72. package/templates/vue/features/pageRoutes/node_modules/.bin/yaml +4 -4
  73. package/templates/vue/features/pageRoutes/package.json +0 -1
  74. package/templates/vue/features/pinia/atom.mjs +11 -0
  75. package/templates/vue/features/sentry/atom.mjs +35 -0
  76. package/templates/vue/features/sentry/package.json +1 -3
  77. package/templates/vue/micro-frontends/qiankun/base/atom.mjs +19 -0
  78. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/jiti +4 -4
  79. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/sass +4 -4
  80. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite +2 -2
  81. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/yaml +4 -4
  82. package/templates/vue/micro-frontends/qiankun/base/package.json +0 -2
  83. package/templates/vue/micro-frontends/qiankun/base/src/types/index.ts +16 -0
  84. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/jiti +4 -4
  85. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/parser +4 -4
  86. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/sass +4 -4
  87. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/vite +4 -4
  88. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/yaml +4 -4
  89. package/templates/vue/micro-frontends/qiankun/features/element-plus/package.json +3 -2
  90. package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/index.vue +1 -1
  91. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/jiti +4 -4
  92. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass +4 -4
  93. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/vite +4 -4
  94. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/yaml +4 -4
  95. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/jiti +4 -4
  96. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/sass +4 -4
  97. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/vite +4 -4
  98. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/yaml +4 -4
  99. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/package.json +0 -1
  100. package/templates/common/base/node_modules/.bin/parser +0 -17
  101. package/templates/common/base/node_modules/.bin/rollup +0 -17
  102. package/templates/common/base/node_modules/.bin/terser +0 -17
  103. package/templates/common/base/vite/index.ts +0 -54
  104. package/templates/common/base/vite.config.ts +0 -58
  105. package/templates/common/features/eslint/node_modules/.bin/terser +0 -17
  106. package/templates/react/base/node_modules/.bin/terser +0 -17
  107. package/templates/react/base/src/main/index.ts +0 -34
  108. package/templates/react/base/src/main.tsx +0 -34
  109. package/templates/react/features/ant-design/src/main/features/ant-design.ts +0 -21
  110. package/templates/react/features/i18n/src/main/features/i18n.ts +0 -19
  111. package/templates/react/features/pageRoutes/node_modules/.bin/browserslist +0 -17
  112. package/templates/react/features/pageRoutes/node_modules/.bin/parser +0 -17
  113. package/templates/react/features/pageRoutes/node_modules/.bin/rollup +0 -17
  114. package/templates/react/features/pageRoutes/node_modules/.bin/terser +0 -17
  115. package/templates/react/features/pageRoutes/node_modules/.bin/tsc +0 -17
  116. package/templates/react/features/pageRoutes/node_modules/.bin/tsserver +0 -17
  117. package/templates/react/features/pageRoutes/vite/features/pageRoutes.ts +0 -15
  118. package/templates/react/features/sentry/node_modules/.bin/browserslist +0 -17
  119. package/templates/react/features/sentry/node_modules/.bin/jiti +0 -17
  120. package/templates/react/features/sentry/node_modules/.bin/parser +0 -17
  121. package/templates/react/features/sentry/node_modules/.bin/rollup +0 -17
  122. package/templates/react/features/sentry/node_modules/.bin/terser +0 -17
  123. package/templates/react/features/sentry/node_modules/.bin/tsc +0 -17
  124. package/templates/react/features/sentry/node_modules/.bin/tsserver +0 -17
  125. package/templates/react/features/sentry/node_modules/.bin/tsx +0 -17
  126. package/templates/react/features/sentry/node_modules/.bin/vite +0 -17
  127. package/templates/react/features/sentry/node_modules/.bin/yaml +0 -17
  128. package/templates/react/features/sentry/src/main/features/sentry.ts +0 -20
  129. package/templates/react/features/sentry/vite/features/sentry.ts +0 -33
  130. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/browserslist +0 -17
  131. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/parser +0 -17
  132. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/rollup +0 -17
  133. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/terser +0 -17
  134. package/templates/react/micro-frontends/qiankun/base/src/main/index.ts +0 -34
  135. package/templates/react/micro-frontends/qiankun/base/src/main.tsx +0 -69
  136. package/templates/react/micro-frontends/qiankun/base/vite/index.ts +0 -54
  137. package/templates/vue/base/src/main/index.ts +0 -36
  138. package/templates/vue/base/src/main.ts +0 -34
  139. package/templates/vue/features/ant-design-vue/src/main/features/ant-design-vue.ts +0 -18
  140. package/templates/vue/features/element-plus/node_modules/.bin/browserslist +0 -17
  141. package/templates/vue/features/element-plus/node_modules/.bin/jiti +0 -17
  142. package/templates/vue/features/element-plus/node_modules/.bin/rollup +0 -17
  143. package/templates/vue/features/element-plus/node_modules/.bin/sass +0 -17
  144. package/templates/vue/features/element-plus/node_modules/.bin/terser +0 -17
  145. package/templates/vue/features/element-plus/node_modules/.bin/tsx +0 -17
  146. package/templates/vue/features/element-plus/node_modules/.bin/vite +0 -17
  147. package/templates/vue/features/element-plus/node_modules/.bin/yaml +0 -17
  148. package/templates/vue/features/element-plus/src/main/features/element-plus.ts +0 -23
  149. package/templates/vue/features/element-plus/vite/features/element-plus.ts +0 -30
  150. package/templates/vue/features/i18n/src/main/features/i18n.ts +0 -19
  151. package/templates/vue/features/pageRoutes/node_modules/.bin/browserslist +0 -17
  152. package/templates/vue/features/pageRoutes/node_modules/.bin/parser +0 -17
  153. package/templates/vue/features/pageRoutes/node_modules/.bin/rollup +0 -17
  154. package/templates/vue/features/pageRoutes/node_modules/.bin/terser +0 -17
  155. package/templates/vue/features/pageRoutes/vite/features/pageRoutes.ts +0 -15
  156. package/templates/vue/features/pinia/src/main/features/pinia.ts +0 -19
  157. package/templates/vue/features/sentry/node_modules/.bin/browserslist +0 -17
  158. package/templates/vue/features/sentry/node_modules/.bin/jiti +0 -17
  159. package/templates/vue/features/sentry/node_modules/.bin/parser +0 -17
  160. package/templates/vue/features/sentry/node_modules/.bin/rollup +0 -17
  161. package/templates/vue/features/sentry/node_modules/.bin/sass +0 -17
  162. package/templates/vue/features/sentry/node_modules/.bin/terser +0 -17
  163. package/templates/vue/features/sentry/node_modules/.bin/vite +0 -17
  164. package/templates/vue/features/sentry/src/main/features/sentry.ts +0 -22
  165. package/templates/vue/features/sentry/vite/features/sentry.ts +0 -33
  166. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/browserslist +0 -17
  167. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/parser +0 -17
  168. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/rollup +0 -17
  169. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/terser +0 -17
  170. package/templates/vue/micro-frontends/qiankun/base/src/main/index.ts +0 -36
  171. package/templates/vue/micro-frontends/qiankun/base/src/main.ts +0 -70
  172. package/templates/vue/micro-frontends/qiankun/base/vite/index.ts +0 -54
  173. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/browserslist +0 -17
  174. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/rollup +0 -17
  175. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/terser +0 -17
  176. package/templates/vue/micro-frontends/qiankun/features/element-plus/src/main/features/element-plus.ts +0 -24
  177. package/templates/vue/micro-frontends/qiankun/features/element-plus/vite/features/element-plus.ts +0 -30
  178. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser +0 -17
  179. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/browserslist +0 -17
  180. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/parser +0 -17
  181. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/rollup +0 -17
  182. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/terser +0 -17
  183. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/vite/features/pageRoutes.ts +0 -15
  184. /package/templates/vue/features/element-plus/src/components/SubMenu/src/{_types → types}/index.ts +0 -0
  185. /package/templates/vue/features/element-plus/src/components/SubMenu/src/{_types → types}/props.ts +0 -0
  186. /package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/{_types → types}/index.ts +0 -0
  187. /package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/{_types → types}/props.ts +0 -0
@@ -1,33 +0,0 @@
1
- /**
2
- * Sentry Vite 插件配置
3
- */
4
-
5
- import process from 'node:process'
6
- import { sentryVitePlugin } from '@sentry/vite-plugin'
7
- import type { ViteConfigType, ViteFeatureContext } from '@moluoxixi/vite-config'
8
-
9
- /**
10
- * 获取 Sentry Vite 配置
11
- * @param ctx - feature 配置上下文
12
- * @param ctx.viteEnv - Vite 环境变量
13
- * @param ctx.mode - 构建模式
14
- * @returns Config 配置(与 ViteConfigType 结构一致)
15
- */
16
- export default ({ viteEnv, mode }: ViteFeatureContext): Partial<ViteConfigType> => ({
17
- viteConfig: {
18
- plugins: [
19
- viteEnv.VITE_SENTRY && mode === 'production' && sentryVitePlugin({
20
- authToken: process.env.SENTRY_AUTH_TOKEN,
21
- org: 'f1f562b9b82f',
22
- project: 'javascript-react',
23
- sourcemaps: {
24
- assets: './dist/**',
25
- ignore: ['node_modules'],
26
- },
27
- release: {
28
- name: viteEnv.VITE_APP_VERSION || 'unknown',
29
- },
30
- }),
31
- ].filter(Boolean),
32
- },
33
- })
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
15
- else
16
- exec node "$basedir/../../../../../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../../node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/babel-parser.js" "$@"
15
- else
16
- exec node "$basedir/../../../../../../../node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/babel-parser.js" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../../node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
15
- else
16
- exec node "$basedir/../../../../../../../node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
15
- else
16
- exec node "$basedir/../../../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
17
- fi
@@ -1,34 +0,0 @@
1
- /**
2
- * Feature 设置模块 - Qiankun 微前端模式
3
- * 使用 Vite 的 glob 导入自动发现并加载所有 feature 模块
4
- */
5
-
6
- import type { Router } from 'react-router-dom'
7
-
8
- /**
9
- * Feature 模块接口
10
- */
11
- interface FeatureModule {
12
- /** 初始化 feature 的设置函数 */
13
- setup?: (router?: Router) => void | Promise<void>
14
- /** 执行顺序(数字越小越先执行) */
15
- order?: number
16
- }
17
-
18
- // 自动发现所有 feature 模块
19
- const featureModules = import.meta.glob('./features/*.ts', { eager: true })
20
-
21
- /**
22
- * 设置所有 features
23
- * @param router - React Router 实例(可选)
24
- */
25
- export async function setupFeatures(router?: Router): Promise<void> {
26
- const modules = Object.values(featureModules) as FeatureModule[]
27
-
28
- // 按顺序排序(默认 100)
29
- modules.sort((a, b) => (a.order ?? 100) - (b.order ?? 100))
30
-
31
- for (const mod of modules) {
32
- await mod.setup?.(router)
33
- }
34
- }
@@ -1,69 +0,0 @@
1
- /**
2
- * Application entry file - Qiankun micro-frontend mode
3
- * Initialize React application and mount to DOM (supports qiankun lifecycle)
4
- */
5
-
6
- import { qiankunWindow, renderWithQiankun } from 'vite-plugin-qiankun/dist/helper'
7
- import React from 'react'
8
- import ReactDOM from 'react-dom/client'
9
- import { RouterProvider } from 'react-router-dom'
10
- import { createRouter } from './router'
11
- import { setupFeatures } from './main/index'
12
-
13
- // Import styles
14
- import './assets/styles/main.scss'
15
- import './assets/fonts/index.css'
16
-
17
- let root: ReturnType<typeof ReactDOM.createRoot> | null = null
18
-
19
- /**
20
- * Render application
21
- * @param props - Render props from qiankun
22
- */
23
- async function render(props: Record<string, unknown> = {}): Promise<void> {
24
- const { container } = props as { container?: Element }
25
-
26
- const basename = qiankunWindow.__POWERED_BY_QIANKUN__
27
- ? (qiankunWindow as { __INJECTED_PUBLIC_PATH_BY_QIANKUN__?: string }).__INJECTED_PUBLIC_PATH_BY_QIANKUN__?.split('/')[1]
28
- : undefined
29
- const router = createRouter({ basename })
30
-
31
- // Setup all features (i18n, sentry, etc.)
32
- await setupFeatures(router)
33
-
34
- const containerElement = container
35
- ? container.querySelector('#root') || container
36
- : document.getElementById('root')!
37
-
38
- root = ReactDOM.createRoot(containerElement)
39
- root.render(
40
- <React.StrictMode>
41
- <RouterProvider router={router} />
42
- </React.StrictMode>,
43
- )
44
- }
45
-
46
- // Qiankun lifecycle
47
- if (!qiankunWindow.__POWERED_BY_QIANKUN__) {
48
- // Standalone mode
49
- render({})
50
- }
51
- else {
52
- // Micro-frontend mode
53
- renderWithQiankun({
54
- async mount(props: Record<string, unknown>) {
55
- await render(props)
56
- },
57
- bootstrap() {
58
- console.log('[Qiankun] React app bootstrapped')
59
- },
60
- unmount() {
61
- root?.unmount()
62
- root = null
63
- console.log('[Qiankun] React app unmounted')
64
- },
65
- update() {
66
- console.log('[Qiankun] React app updated')
67
- },
68
- })
69
- }
@@ -1,54 +0,0 @@
1
- import fs from 'node:fs'
2
- import path from 'node:path'
3
- import { fileURLToPath } from 'node:url'
4
- import { mergeConfig } from 'vite'
5
- import type { UserConfig } from 'vite'
6
- import type { ViteConfigType, ViteFeatureContext } from '@moluoxixi/vite-config'
7
- import { createJiti } from 'jiti'
8
-
9
- const __dirname = path.dirname(fileURLToPath(import.meta.url))
10
- const _require = createJiti(import.meta.url, { interopDefault: true })
11
-
12
- /**
13
- * 加载所有 feature 的 Vite 配置
14
- * @param ctx - feature 配置上下文
15
- * @returns 合并后的 Config 配置(与 ViteConfigType 结构一致)
16
- */
17
- export function loadFeatureConfigs(ctx: ViteFeatureContext): Partial<ViteConfigType> {
18
- const featuresDir = path.resolve(__dirname, 'features')
19
-
20
- if (!fs.existsSync(featuresDir)) {
21
- return {}
22
- }
23
-
24
- const featureFiles = fs.readdirSync(featuresDir).filter(f => f.endsWith('.ts'))
25
- const viteConfigs: UserConfig[] = []
26
- let mergedConfig: Partial<ViteConfigType> = {}
27
-
28
- for (const file of featureFiles) {
29
- try {
30
- const filePath = path.resolve(featuresDir, file)
31
- const mod = _require(filePath)
32
- const config = mod.default(ctx) as Partial<ViteConfigType> | undefined
33
- if (config) {
34
- // 提取 viteConfig 单独合并
35
- const { viteConfig, ...restConfig } = config
36
- if (viteConfig && typeof viteConfig !== 'function') {
37
- viteConfigs.push(viteConfig)
38
- }
39
- // 合并其他配置(pageRoutes, autoComponent 等)
40
- mergedConfig = { ...mergedConfig, ...restConfig }
41
- }
42
- }
43
- catch (e) {
44
- console.warn(`[Vite] Failed to load feature config: ${file}`, e)
45
- }
46
- }
47
-
48
- // 合并所有 viteConfig
49
- if (viteConfigs.length > 0) {
50
- mergedConfig.viteConfig = viteConfigs.reduce((acc, cfg) => mergeConfig(acc, cfg), {} as UserConfig)
51
- }
52
-
53
- return mergedConfig
54
- }
@@ -1,36 +0,0 @@
1
- /**
2
- * Feature 设置模块
3
- * 使用 Vite 的 glob 导入自动发现并加载所有 feature 模块
4
- */
5
-
6
- import type { App } from 'vue'
7
- import type { Router } from 'vue-router'
8
-
9
- /**
10
- * Feature 模块接口
11
- */
12
- interface FeatureModule {
13
- /** 初始化 feature 的设置函数 */
14
- setup?: (app: App, router: Router) => void | Promise<void>
15
- /** 执行顺序(数字越小越先执行) */
16
- order?: number
17
- }
18
-
19
- // 自动发现所有 feature 模块
20
- const featureModules = import.meta.glob('./features/*.ts', { eager: true })
21
-
22
- /**
23
- * 设置所有 features
24
- * @param app - Vue 应用实例
25
- * @param router - Vue Router 实例
26
- */
27
- export async function setupFeatures(app: App, router: Router): Promise<void> {
28
- const modules = Object.values(featureModules) as FeatureModule[]
29
-
30
- // 按顺序排序(默认 100)
31
- modules.sort((a, b) => (a.order ?? 100) - (b.order ?? 100))
32
-
33
- for (const mod of modules) {
34
- await mod.setup?.(app, router)
35
- }
36
- }
@@ -1,34 +0,0 @@
1
- /**
2
- * Application entry file - Standard mode
3
- * Initialize Vue application and mount to DOM
4
- */
5
-
6
- import { createApp } from 'vue'
7
- import directives from '@/directives'
8
- import App from '@/App.vue'
9
- import getRouter from '@/router'
10
- import { setupFeatures } from '@/main/index'
11
-
12
- // Import styles
13
- import '@/assets/styles/main.scss'
14
- import '@/assets/fonts/index.css'
15
-
16
- /**
17
- * Initialize and render application
18
- */
19
- async function initApp(): Promise<void> {
20
- const app = createApp(App)
21
- const router = getRouter()
22
-
23
- directives(app)
24
-
25
- // Setup all features (pinia, i18n, sentry, etc.)
26
- await setupFeatures(app, router)
27
-
28
- app.use(router)
29
- app.config.warnHandler = () => null
30
-
31
- app.mount('#app')
32
- }
33
-
34
- initApp()
@@ -1,18 +0,0 @@
1
- /**
2
- * Ant Design Vue UI 组件库 feature 设置
3
- */
4
-
5
- import type { App } from 'vue'
6
- import type { Router } from 'vue-router'
7
-
8
- /** 执行顺序 - 样式应该尽早加载 */
9
- export const order = 5
10
-
11
- /**
12
- * 设置 Ant Design Vue
13
- * @param _app - Vue 应用实例(未使用,自动导入)
14
- * @param _router - Vue Router 实例(未使用)
15
- */
16
- export function setup(_app: App, _router: Router): void {
17
- // Ant Design Vue 通过 unplugin-vue-components 自动导入
18
- }
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti-cli.mjs" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti-cli.mjs" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules/sass/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules/sass/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/sass@1.97.3/node_modules/sass/sass.js" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/sass@1.97.3/node_modules/sass/sass.js" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/bin/vite.js" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/bin/vite.js" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" "$@"
17
- fi
@@ -1,23 +0,0 @@
1
- /**
2
- * Element Plus UI 组件库 feature 设置
3
- * 导入 Element Plus 样式
4
- */
5
-
6
- import type { App } from 'vue'
7
- import type { Router } from 'vue-router'
8
-
9
- // 导入 Element Plus 样式
10
- import '@/assets/styles/element/index.scss'
11
-
12
- /** 执行顺序 - 样式应该尽早加载 */
13
- export const order = 5
14
-
15
- /**
16
- * 设置 Element Plus
17
- * @param _app - Vue 应用实例(未使用,样式已导入)
18
- * @param _router - Vue Router 实例(未使用)
19
- */
20
- export function setup(_app: App, _router: Router): void {
21
- // Element Plus 通过 unplugin-vue-components 自动导入
22
- // 只需要导入样式
23
- }
@@ -1,30 +0,0 @@
1
- /**
2
- * Element Plus Vite 配置
3
- * 为 Element Plus 添加 SCSS 命名空间配置
4
- */
5
-
6
- import type { ViteConfigType, ViteFeatureContext } from '@moluoxixi/vite-config'
7
-
8
- /**
9
- * 获取 Element Plus Vite 配置
10
- * @param ctx - feature 配置上下文
11
- * @param ctx.appCode - 应用代码,用于 SCSS 命名空间
12
- * @returns Config 配置(与 ViteConfigType 结构一致)
13
- */
14
- export default ({ appCode }: ViteFeatureContext): Partial<ViteConfigType> => ({
15
- viteConfig: {
16
- css: {
17
- preprocessorOptions: {
18
- scss: {
19
- additionalData: (source: string, filename: string) => {
20
- if (filename.includes('assets/styles/element/index.scss')) {
21
- return `$namespace: ${appCode || 'el'};
22
- ${source}`
23
- }
24
- return source
25
- },
26
- },
27
- },
28
- },
29
- },
30
- })
@@ -1,19 +0,0 @@
1
- /**
2
- * I18n 国际化 feature 设置
3
- */
4
-
5
- import type { App } from 'vue'
6
- import type { Router } from 'vue-router'
7
- import i18n from '@/locales'
8
-
9
- /** 执行顺序 */
10
- export const order = 20
11
-
12
- /**
13
- * 设置 i18n
14
- * @param app - Vue 应用实例
15
- * @param _router - Vue Router 实例(未使用)
16
- */
17
- export function setup(app: App, _router: Router): void {
18
- app.use(i18n)
19
- }
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/babel-parser.js" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/babel-parser.js" "$@"
17
- fi