@dcloudio/uni-cli-shared 3.0.0-alpha-4070720250804001 → 3.0.0-alpha-4070620250731002

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 (163) hide show
  1. package/dist/easycom.d.ts +0 -1
  2. package/dist/easycom.js +13 -17
  3. package/dist/hbx/alias.js +10 -43
  4. package/dist/hbx/index.js +0 -10
  5. package/dist/hbx/log.js +1 -23
  6. package/dist/index.d.ts +1 -2
  7. package/dist/index.js +1 -3
  8. package/dist/json/index.d.ts +1 -1
  9. package/dist/json/index.js +1 -2
  10. package/dist/json/manifest.d.ts +0 -1
  11. package/dist/json/manifest.js +1 -11
  12. package/dist/json/mp/jsonFile.js +2 -4
  13. package/dist/json/mp/pages.js +0 -1
  14. package/dist/json/mp/types.d.ts +1 -4
  15. package/dist/json/uni-x/manifest.d.ts +0 -1
  16. package/dist/json/uni-x/manifest.js +1 -5
  17. package/dist/messages/zh_CN.js +0 -1
  18. package/dist/uni_modules.cloud.d.ts +4 -10
  19. package/dist/uni_modules.cloud.js +19 -58
  20. package/dist/uni_modules.d.ts +0 -2
  21. package/dist/uni_modules.js +2 -81
  22. package/dist/uts.js +0 -16
  23. package/dist/vite/autoImport.js +0 -2
  24. package/dist/vite/cloud.js +5 -51
  25. package/dist/vite/plugins/index.d.ts +0 -1
  26. package/dist/vite/plugins/index.js +1 -3
  27. package/dist/vite/plugins/inject.js +1 -3
  28. package/dist/vite/plugins/uts/uni_modules.d.ts +0 -1
  29. package/dist/vite/plugins/uts/uni_modules.js +14 -63
  30. package/dist/vite/plugins/uts/uvue.js +3 -17
  31. package/dist/vite/plugins/vitejs/plugins/css.js +5 -40
  32. package/dist/vue/transforms/transformUTSComponent.js +3 -8
  33. package/package.json +38 -38
  34. package/dist/vite/plugins/stats.d.ts +0 -2
  35. package/dist/vite/plugins/stats.js +0 -42
  36. package/dist/workers.d.ts +0 -14
  37. package/dist/workers.js +0 -187
  38. package/lib/vapor/@vitejs/plugin-vue/LICENSE +0 -21
  39. package/lib/vapor/@vitejs/plugin-vue/README.md +0 -278
  40. package/lib/vapor/@vitejs/plugin-vue/dist/index.cjs +0 -3105
  41. package/lib/vapor/@vitejs/plugin-vue/dist/index.d.cts +0 -113
  42. package/lib/vapor/@vitejs/plugin-vue/dist/index.d.mts +0 -111
  43. package/lib/vapor/@vitejs/plugin-vue/dist/index.d.ts +0 -113
  44. package/lib/vapor/@vitejs/plugin-vue/dist/index.mjs +0 -3090
  45. package/lib/vapor/@vitejs/plugin-vue/package.json +0 -50
  46. package/lib/vapor/@vue/compiler-core/LICENSE +0 -21
  47. package/lib/vapor/@vue/compiler-core/README.md +0 -1
  48. package/lib/vapor/@vue/compiler-core/dist/compiler-core.cjs.js +0 -6902
  49. package/lib/vapor/@vue/compiler-core/dist/compiler-core.cjs.prod.js +0 -6779
  50. package/lib/vapor/@vue/compiler-core/dist/compiler-core.esm-bundler.js +0 -5870
  51. package/lib/vapor/@vue/compiler-core/index.js +0 -7
  52. package/lib/vapor/@vue/compiler-core/package.json +0 -58
  53. package/lib/vapor/@vue/compiler-dom/LICENSE +0 -21
  54. package/lib/vapor/@vue/compiler-dom/README.md +0 -1
  55. package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.cjs.js +0 -936
  56. package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +0 -856
  57. package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +0 -6682
  58. package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +0 -14
  59. package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +0 -693
  60. package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.global.js +0 -6855
  61. package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.global.prod.js +0 -14
  62. package/lib/vapor/@vue/compiler-dom/index.js +0 -7
  63. package/lib/vapor/@vue/compiler-dom/package.json +0 -57
  64. package/lib/vapor/@vue/compiler-sfc/LICENSE +0 -21
  65. package/lib/vapor/@vue/compiler-sfc/README.md +0 -80
  66. package/lib/vapor/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +0 -21682
  67. package/lib/vapor/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +0 -66272
  68. package/lib/vapor/@vue/compiler-sfc/package.json +0 -68
  69. package/lib/vapor/@vue/compiler-ssr/LICENSE +0 -21
  70. package/lib/vapor/@vue/compiler-ssr/README.md +0 -1
  71. package/lib/vapor/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +0 -1402
  72. package/lib/vapor/@vue/compiler-ssr/package.json +0 -34
  73. package/lib/vapor/@vue/compiler-vapor/LICENSE +0 -21
  74. package/lib/vapor/@vue/compiler-vapor/README.md +0 -1
  75. package/lib/vapor/@vue/compiler-vapor/dist/compiler-vapor.cjs.js +0 -4540
  76. package/lib/vapor/@vue/compiler-vapor/dist/compiler-vapor.esm-browser.js +0 -37020
  77. package/lib/vapor/@vue/compiler-vapor/package.json +0 -49
  78. package/lib/vapor/@vue/reactivity/LICENSE +0 -21
  79. package/lib/vapor/@vue/reactivity/README.md +0 -19
  80. package/lib/vapor/@vue/reactivity/dist/reactivity.cjs.js +0 -2033
  81. package/lib/vapor/@vue/reactivity/dist/reactivity.cjs.prod.js +0 -1841
  82. package/lib/vapor/@vue/reactivity/dist/reactivity.esm-browser.js +0 -2023
  83. package/lib/vapor/@vue/reactivity/dist/reactivity.esm-browser.prod.js +0 -5
  84. package/lib/vapor/@vue/reactivity/dist/reactivity.esm-bundler.js +0 -1992
  85. package/lib/vapor/@vue/reactivity/dist/reactivity.global.js +0 -2082
  86. package/lib/vapor/@vue/reactivity/dist/reactivity.global.prod.js +0 -5
  87. package/lib/vapor/@vue/reactivity/index.js +0 -7
  88. package/lib/vapor/@vue/reactivity/package.json +0 -55
  89. package/lib/vapor/@vue/runtime-core/LICENSE +0 -21
  90. package/lib/vapor/@vue/runtime-core/README.md +0 -28
  91. package/lib/vapor/@vue/runtime-core/dist/runtime-core.cjs.js +0 -8972
  92. package/lib/vapor/@vue/runtime-core/dist/runtime-core.cjs.prod.js +0 -7088
  93. package/lib/vapor/@vue/runtime-core/dist/runtime-core.esm-bundler.js +0 -8913
  94. package/lib/vapor/@vue/runtime-core/index.js +0 -7
  95. package/lib/vapor/@vue/runtime-core/package.json +0 -54
  96. package/lib/vapor/@vue/runtime-dom/LICENSE +0 -21
  97. package/lib/vapor/@vue/runtime-dom/README.md +0 -13
  98. package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.cjs.js +0 -1797
  99. package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +0 -1646
  100. package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.esm-browser.js +0 -12929
  101. package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js +0 -6
  102. package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0 -1838
  103. package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.global.js +0 -13086
  104. package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.global.prod.js +0 -6
  105. package/lib/vapor/@vue/runtime-dom/index.js +0 -7
  106. package/lib/vapor/@vue/runtime-dom/package.json +0 -60
  107. package/lib/vapor/@vue/runtime-vapor/LICENSE +0 -21
  108. package/lib/vapor/@vue/runtime-vapor/README.md +0 -8
  109. package/lib/vapor/@vue/runtime-vapor/dist/runtime-vapor.esm-bundler.js +0 -3242
  110. package/lib/vapor/@vue/runtime-vapor/package.json +0 -47
  111. package/lib/vapor/@vue/server-renderer/LICENSE +0 -21
  112. package/lib/vapor/@vue/server-renderer/README.md +0 -178
  113. package/lib/vapor/@vue/server-renderer/dist/server-renderer.cjs.js +0 -1144
  114. package/lib/vapor/@vue/server-renderer/dist/server-renderer.cjs.prod.js +0 -871
  115. package/lib/vapor/@vue/server-renderer/dist/server-renderer.esm-browser.js +0 -8756
  116. package/lib/vapor/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js +0 -5
  117. package/lib/vapor/@vue/server-renderer/dist/server-renderer.esm-bundler.js +0 -1366
  118. package/lib/vapor/@vue/server-renderer/index.js +0 -7
  119. package/lib/vapor/@vue/server-renderer/package.json +0 -55
  120. package/lib/vapor/@vue/shared/LICENSE +0 -21
  121. package/lib/vapor/@vue/shared/README.md +0 -3
  122. package/lib/vapor/@vue/shared/dist/shared.cjs.js +0 -698
  123. package/lib/vapor/@vue/shared/dist/shared.cjs.prod.js +0 -690
  124. package/lib/vapor/@vue/shared/dist/shared.esm-bundler.js +0 -616
  125. package/lib/vapor/@vue/shared/index.js +0 -7
  126. package/lib/vapor/@vue/shared/package.json +0 -47
  127. package/lib/vapor/@vue/vue/LICENSE +0 -21
  128. package/lib/vapor/@vue/vue/README.md +0 -62
  129. package/lib/vapor/@vue/vue/compiler-sfc/index.browser.js +0 -1
  130. package/lib/vapor/@vue/vue/compiler-sfc/index.browser.mjs +0 -1
  131. package/lib/vapor/@vue/vue/compiler-sfc/index.d.mts +0 -1
  132. package/lib/vapor/@vue/vue/compiler-sfc/index.d.ts +0 -1
  133. package/lib/vapor/@vue/vue/compiler-sfc/index.js +0 -3
  134. package/lib/vapor/@vue/vue/compiler-sfc/index.mjs +0 -3
  135. package/lib/vapor/@vue/vue/compiler-sfc/package.json +0 -4
  136. package/lib/vapor/@vue/vue/compiler-sfc/register-ts.js +0 -3
  137. package/lib/vapor/@vue/vue/dist/vue.cjs.js +0 -80
  138. package/lib/vapor/@vue/vue/dist/vue.cjs.prod.js +0 -66
  139. package/lib/vapor/@vue/vue/dist/vue.esm-browser.js +0 -18840
  140. package/lib/vapor/@vue/vue/dist/vue.esm-browser.prod.js +0 -12
  141. package/lib/vapor/@vue/vue/dist/vue.esm-bundler.js +0 -72
  142. package/lib/vapor/@vue/vue/dist/vue.global.js +0 -18820
  143. package/lib/vapor/@vue/vue/dist/vue.global.prod.js +0 -12
  144. package/lib/vapor/@vue/vue/dist/vue.runtime-with-vapor.esm-browser.js +0 -15648
  145. package/lib/vapor/@vue/vue/dist/vue.runtime-with-vapor.esm-browser.prod.js +0 -9
  146. package/lib/vapor/@vue/vue/dist/vue.runtime.esm-browser.js +0 -12953
  147. package/lib/vapor/@vue/vue/dist/vue.runtime.esm-browser.prod.js +0 -6
  148. package/lib/vapor/@vue/vue/dist/vue.runtime.esm-bundler.js +0 -29
  149. package/lib/vapor/@vue/vue/dist/vue.runtime.global.js +0 -13111
  150. package/lib/vapor/@vue/vue/dist/vue.runtime.global.prod.js +0 -6
  151. package/lib/vapor/@vue/vue/index.js +0 -7
  152. package/lib/vapor/@vue/vue/index.mjs +0 -1
  153. package/lib/vapor/@vue/vue/jsx-runtime/index.d.ts +0 -25
  154. package/lib/vapor/@vue/vue/jsx-runtime/index.js +0 -15
  155. package/lib/vapor/@vue/vue/jsx-runtime/index.mjs +0 -12
  156. package/lib/vapor/@vue/vue/jsx-runtime/package.json +0 -5
  157. package/lib/vapor/@vue/vue/jsx.d.ts +0 -22
  158. package/lib/vapor/@vue/vue/package.json +0 -114
  159. package/lib/vapor/@vue/vue/server-renderer/index.d.mts +0 -1
  160. package/lib/vapor/@vue/vue/server-renderer/index.d.ts +0 -1
  161. package/lib/vapor/@vue/vue/server-renderer/index.js +0 -1
  162. package/lib/vapor/@vue/vue/server-renderer/index.mjs +0 -1
  163. package/lib/vapor/@vue/vue/server-renderer/package.json +0 -4
@@ -1,113 +0,0 @@
1
- import { Plugin, ViteDevServer } from 'vite';
2
- import * as _compiler from 'vue/compiler-sfc';
3
- import { SFCScriptCompileOptions, SFCTemplateCompileOptions, SFCStyleCompileOptions } from 'vue/compiler-sfc';
4
-
5
- interface VueQuery {
6
- vue?: boolean;
7
- src?: string;
8
- type?: 'script' | 'template' | 'style' | 'custom';
9
- index?: number;
10
- lang?: string;
11
- raw?: boolean;
12
- url?: boolean;
13
- scoped?: boolean;
14
- id?: string;
15
- }
16
- declare function parseVueRequest(id: string): {
17
- filename: string;
18
- query: VueQuery;
19
- };
20
-
21
- interface Options {
22
- include?: string | RegExp | (string | RegExp)[];
23
- exclude?: string | RegExp | (string | RegExp)[];
24
- /**
25
- * In Vite, this option follows Vite's config.
26
- */
27
- isProduction?: boolean;
28
- script?: Partial<Omit<SFCScriptCompileOptions, 'id' | 'isProd' | 'inlineTemplate' | 'templateOptions' | 'sourceMap' | 'genDefaultAs' | 'customElement' | 'defineModel' | 'propsDestructure'>> & {
29
- /**
30
- * @deprecated defineModel is now a stable feature and always enabled if
31
- * using Vue 3.4 or above.
32
- */
33
- defineModel?: boolean;
34
- /**
35
- * @deprecated moved to `features.propsDestructure`.
36
- */
37
- propsDestructure?: boolean;
38
- };
39
- template?: Partial<Omit<SFCTemplateCompileOptions, 'id' | 'source' | 'ast' | 'filename' | 'scoped' | 'slotted' | 'isProd' | 'inMap' | 'ssr' | 'ssrCssVars' | 'preprocessLang'>>;
40
- style?: Partial<Omit<SFCStyleCompileOptions, 'filename' | 'id' | 'isProd' | 'source' | 'scoped' | 'cssDevSourcemap' | 'postcssOptions' | 'map' | 'postcssPlugins' | 'preprocessCustomRequire' | 'preprocessLang' | 'preprocessOptions'>>;
41
- /**
42
- * Use custom compiler-sfc instance. Can be used to force a specific version.
43
- */
44
- compiler?: typeof _compiler;
45
- /**
46
- * Requires @vitejs/plugin-vue@^5.1.0
47
- */
48
- features?: {
49
- /**
50
- * Enable reactive destructure for `defineProps`.
51
- * - Available in Vue 3.4 and later.
52
- * - **default:** `false` in Vue 3.4 (**experimental**), `true` in Vue 3.5+
53
- */
54
- propsDestructure?: boolean;
55
- /**
56
- * Transform Vue SFCs into custom elements.
57
- * - `true`: all `*.vue` imports are converted into custom elements
58
- * - `string | RegExp`: matched files are converted into custom elements
59
- * - **default:** /\.ce\.vue$/
60
- */
61
- customElement?: boolean | string | RegExp | (string | RegExp)[];
62
- /**
63
- * Set to `false` to disable Options API support and allow related code in
64
- * Vue core to be dropped via dead-code elimination in production builds,
65
- * resulting in smaller bundles.
66
- * - **default:** `true`
67
- */
68
- optionsAPI?: boolean;
69
- /**
70
- * Set to `true` to enable devtools support in production builds.
71
- * Results in slightly larger bundles.
72
- * - **default:** `false`
73
- */
74
- prodDevtools?: boolean;
75
- /**
76
- * Set to `true` to enable detailed information for hydration mismatch
77
- * errors in production builds. Results in slightly larger bundles.
78
- * - **default:** `false`
79
- */
80
- prodHydrationMismatchDetails?: boolean;
81
- /**
82
- * Customize the component ID generation strategy.
83
- * - `'filepath'`: hash the file path (relative to the project root)
84
- * - `'filepath-source'`: hash the file path and the source code
85
- * - `function`: custom function that takes the file path, source code,
86
- * whether in production mode, and the default hash function as arguments
87
- * - **default:** `'filepath'` in development, `'filepath-source'` in production
88
- */
89
- componentIdGenerator?: 'filepath' | 'filepath-source' | ((filepath: string, source: string, isProduction: boolean | undefined, getHash: (text: string) => string) => string);
90
- };
91
- /**
92
- * @deprecated moved to `features.customElement`.
93
- */
94
- customElement?: boolean | string | RegExp | (string | RegExp)[];
95
- }
96
- interface ResolvedOptions extends Options {
97
- compiler: typeof _compiler;
98
- root: string;
99
- sourceMap: boolean;
100
- cssDevSourcemap: boolean;
101
- devServer?: ViteDevServer;
102
- devToolsEnabled?: boolean;
103
- }
104
- interface Api {
105
- get options(): ResolvedOptions;
106
- set options(value: ResolvedOptions);
107
- version: string;
108
- }
109
- declare function vuePlugin(rawOptions?: Options): Plugin<Api>;
110
-
111
- // @ts-ignore
112
- export = vuePlugin;
113
- export { type Api, type Options, type ResolvedOptions, type VueQuery, parseVueRequest };
@@ -1,111 +0,0 @@
1
- import { Plugin, ViteDevServer } from 'vite';
2
- import * as _compiler from 'vue/compiler-sfc';
3
- import { SFCScriptCompileOptions, SFCTemplateCompileOptions, SFCStyleCompileOptions } from 'vue/compiler-sfc';
4
-
5
- interface VueQuery {
6
- vue?: boolean;
7
- src?: string;
8
- type?: 'script' | 'template' | 'style' | 'custom';
9
- index?: number;
10
- lang?: string;
11
- raw?: boolean;
12
- url?: boolean;
13
- scoped?: boolean;
14
- id?: string;
15
- }
16
- declare function parseVueRequest(id: string): {
17
- filename: string;
18
- query: VueQuery;
19
- };
20
-
21
- interface Options {
22
- include?: string | RegExp | (string | RegExp)[];
23
- exclude?: string | RegExp | (string | RegExp)[];
24
- /**
25
- * In Vite, this option follows Vite's config.
26
- */
27
- isProduction?: boolean;
28
- script?: Partial<Omit<SFCScriptCompileOptions, 'id' | 'isProd' | 'inlineTemplate' | 'templateOptions' | 'sourceMap' | 'genDefaultAs' | 'customElement' | 'defineModel' | 'propsDestructure'>> & {
29
- /**
30
- * @deprecated defineModel is now a stable feature and always enabled if
31
- * using Vue 3.4 or above.
32
- */
33
- defineModel?: boolean;
34
- /**
35
- * @deprecated moved to `features.propsDestructure`.
36
- */
37
- propsDestructure?: boolean;
38
- };
39
- template?: Partial<Omit<SFCTemplateCompileOptions, 'id' | 'source' | 'ast' | 'filename' | 'scoped' | 'slotted' | 'isProd' | 'inMap' | 'ssr' | 'ssrCssVars' | 'preprocessLang'>>;
40
- style?: Partial<Omit<SFCStyleCompileOptions, 'filename' | 'id' | 'isProd' | 'source' | 'scoped' | 'cssDevSourcemap' | 'postcssOptions' | 'map' | 'postcssPlugins' | 'preprocessCustomRequire' | 'preprocessLang' | 'preprocessOptions'>>;
41
- /**
42
- * Use custom compiler-sfc instance. Can be used to force a specific version.
43
- */
44
- compiler?: typeof _compiler;
45
- /**
46
- * Requires @vitejs/plugin-vue@^5.1.0
47
- */
48
- features?: {
49
- /**
50
- * Enable reactive destructure for `defineProps`.
51
- * - Available in Vue 3.4 and later.
52
- * - **default:** `false` in Vue 3.4 (**experimental**), `true` in Vue 3.5+
53
- */
54
- propsDestructure?: boolean;
55
- /**
56
- * Transform Vue SFCs into custom elements.
57
- * - `true`: all `*.vue` imports are converted into custom elements
58
- * - `string | RegExp`: matched files are converted into custom elements
59
- * - **default:** /\.ce\.vue$/
60
- */
61
- customElement?: boolean | string | RegExp | (string | RegExp)[];
62
- /**
63
- * Set to `false` to disable Options API support and allow related code in
64
- * Vue core to be dropped via dead-code elimination in production builds,
65
- * resulting in smaller bundles.
66
- * - **default:** `true`
67
- */
68
- optionsAPI?: boolean;
69
- /**
70
- * Set to `true` to enable devtools support in production builds.
71
- * Results in slightly larger bundles.
72
- * - **default:** `false`
73
- */
74
- prodDevtools?: boolean;
75
- /**
76
- * Set to `true` to enable detailed information for hydration mismatch
77
- * errors in production builds. Results in slightly larger bundles.
78
- * - **default:** `false`
79
- */
80
- prodHydrationMismatchDetails?: boolean;
81
- /**
82
- * Customize the component ID generation strategy.
83
- * - `'filepath'`: hash the file path (relative to the project root)
84
- * - `'filepath-source'`: hash the file path and the source code
85
- * - `function`: custom function that takes the file path, source code,
86
- * whether in production mode, and the default hash function as arguments
87
- * - **default:** `'filepath'` in development, `'filepath-source'` in production
88
- */
89
- componentIdGenerator?: 'filepath' | 'filepath-source' | ((filepath: string, source: string, isProduction: boolean | undefined, getHash: (text: string) => string) => string);
90
- };
91
- /**
92
- * @deprecated moved to `features.customElement`.
93
- */
94
- customElement?: boolean | string | RegExp | (string | RegExp)[];
95
- }
96
- interface ResolvedOptions extends Options {
97
- compiler: typeof _compiler;
98
- root: string;
99
- sourceMap: boolean;
100
- cssDevSourcemap: boolean;
101
- devServer?: ViteDevServer;
102
- devToolsEnabled?: boolean;
103
- }
104
- interface Api {
105
- get options(): ResolvedOptions;
106
- set options(value: ResolvedOptions);
107
- version: string;
108
- }
109
- declare function vuePlugin(rawOptions?: Options): Plugin<Api>;
110
-
111
- export { type Api, type Options, type ResolvedOptions, type VueQuery, vuePlugin as default, parseVueRequest };
@@ -1,113 +0,0 @@
1
- import { Plugin, ViteDevServer } from 'vite';
2
- import * as _compiler from 'vue/compiler-sfc';
3
- import { SFCScriptCompileOptions, SFCTemplateCompileOptions, SFCStyleCompileOptions } from 'vue/compiler-sfc';
4
-
5
- interface VueQuery {
6
- vue?: boolean;
7
- src?: string;
8
- type?: 'script' | 'template' | 'style' | 'custom';
9
- index?: number;
10
- lang?: string;
11
- raw?: boolean;
12
- url?: boolean;
13
- scoped?: boolean;
14
- id?: string;
15
- }
16
- declare function parseVueRequest(id: string): {
17
- filename: string;
18
- query: VueQuery;
19
- };
20
-
21
- interface Options {
22
- include?: string | RegExp | (string | RegExp)[];
23
- exclude?: string | RegExp | (string | RegExp)[];
24
- /**
25
- * In Vite, this option follows Vite's config.
26
- */
27
- isProduction?: boolean;
28
- script?: Partial<Omit<SFCScriptCompileOptions, 'id' | 'isProd' | 'inlineTemplate' | 'templateOptions' | 'sourceMap' | 'genDefaultAs' | 'customElement' | 'defineModel' | 'propsDestructure'>> & {
29
- /**
30
- * @deprecated defineModel is now a stable feature and always enabled if
31
- * using Vue 3.4 or above.
32
- */
33
- defineModel?: boolean;
34
- /**
35
- * @deprecated moved to `features.propsDestructure`.
36
- */
37
- propsDestructure?: boolean;
38
- };
39
- template?: Partial<Omit<SFCTemplateCompileOptions, 'id' | 'source' | 'ast' | 'filename' | 'scoped' | 'slotted' | 'isProd' | 'inMap' | 'ssr' | 'ssrCssVars' | 'preprocessLang'>>;
40
- style?: Partial<Omit<SFCStyleCompileOptions, 'filename' | 'id' | 'isProd' | 'source' | 'scoped' | 'cssDevSourcemap' | 'postcssOptions' | 'map' | 'postcssPlugins' | 'preprocessCustomRequire' | 'preprocessLang' | 'preprocessOptions'>>;
41
- /**
42
- * Use custom compiler-sfc instance. Can be used to force a specific version.
43
- */
44
- compiler?: typeof _compiler;
45
- /**
46
- * Requires @vitejs/plugin-vue@^5.1.0
47
- */
48
- features?: {
49
- /**
50
- * Enable reactive destructure for `defineProps`.
51
- * - Available in Vue 3.4 and later.
52
- * - **default:** `false` in Vue 3.4 (**experimental**), `true` in Vue 3.5+
53
- */
54
- propsDestructure?: boolean;
55
- /**
56
- * Transform Vue SFCs into custom elements.
57
- * - `true`: all `*.vue` imports are converted into custom elements
58
- * - `string | RegExp`: matched files are converted into custom elements
59
- * - **default:** /\.ce\.vue$/
60
- */
61
- customElement?: boolean | string | RegExp | (string | RegExp)[];
62
- /**
63
- * Set to `false` to disable Options API support and allow related code in
64
- * Vue core to be dropped via dead-code elimination in production builds,
65
- * resulting in smaller bundles.
66
- * - **default:** `true`
67
- */
68
- optionsAPI?: boolean;
69
- /**
70
- * Set to `true` to enable devtools support in production builds.
71
- * Results in slightly larger bundles.
72
- * - **default:** `false`
73
- */
74
- prodDevtools?: boolean;
75
- /**
76
- * Set to `true` to enable detailed information for hydration mismatch
77
- * errors in production builds. Results in slightly larger bundles.
78
- * - **default:** `false`
79
- */
80
- prodHydrationMismatchDetails?: boolean;
81
- /**
82
- * Customize the component ID generation strategy.
83
- * - `'filepath'`: hash the file path (relative to the project root)
84
- * - `'filepath-source'`: hash the file path and the source code
85
- * - `function`: custom function that takes the file path, source code,
86
- * whether in production mode, and the default hash function as arguments
87
- * - **default:** `'filepath'` in development, `'filepath-source'` in production
88
- */
89
- componentIdGenerator?: 'filepath' | 'filepath-source' | ((filepath: string, source: string, isProduction: boolean | undefined, getHash: (text: string) => string) => string);
90
- };
91
- /**
92
- * @deprecated moved to `features.customElement`.
93
- */
94
- customElement?: boolean | string | RegExp | (string | RegExp)[];
95
- }
96
- interface ResolvedOptions extends Options {
97
- compiler: typeof _compiler;
98
- root: string;
99
- sourceMap: boolean;
100
- cssDevSourcemap: boolean;
101
- devServer?: ViteDevServer;
102
- devToolsEnabled?: boolean;
103
- }
104
- interface Api {
105
- get options(): ResolvedOptions;
106
- set options(value: ResolvedOptions);
107
- version: string;
108
- }
109
- declare function vuePlugin(rawOptions?: Options): Plugin<Api>;
110
-
111
- // @ts-ignore
112
- export = vuePlugin;
113
- export { type Api, type Options, type ResolvedOptions, type VueQuery, parseVueRequest };