@dcloudio/uni-cli-shared 3.0.0-4080720251210001 → 3.0.0-5000320260312001

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 (145) hide show
  1. package/dist/constants.d.ts +3 -0
  2. package/dist/constants.js +6 -1
  3. package/dist/deps.js +6 -1
  4. package/dist/dom2/index.d.ts +1 -0
  5. package/dist/dom2/index.js +17 -0
  6. package/dist/dom2/sharedData.d.ts +2 -0
  7. package/dist/dom2/sharedData.js +19 -0
  8. package/dist/easycom.js +34 -5
  9. package/dist/env/define.d.ts +3 -0
  10. package/dist/env/define.js +12 -0
  11. package/dist/hbx/alias.js +15 -17
  12. package/dist/hbx/index.d.ts +1 -1
  13. package/dist/hbx/index.js +4 -2
  14. package/dist/hbx/log.d.ts +5 -0
  15. package/dist/hbx/log.js +44 -1
  16. package/dist/i18n.js +4 -0
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +1 -0
  19. package/dist/json/app/manifest/index.d.ts +1 -0
  20. package/dist/json/app/manifest/index.js +3 -1
  21. package/dist/json/mp/pages.js +0 -5
  22. package/dist/json/pages.d.ts +2 -2
  23. package/dist/json/pages.js +4 -1
  24. package/dist/json/uni-x/index.d.ts +1 -1
  25. package/dist/json/utils.js +31 -22
  26. package/dist/logs/console.js +1 -1
  27. package/dist/logs/index.d.ts +11 -0
  28. package/dist/logs/index.js +34 -1
  29. package/dist/messages/en.d.ts +6 -3
  30. package/dist/messages/en.js +6 -3
  31. package/dist/messages/index.d.ts +11 -5
  32. package/dist/messages/zh_CN.d.ts +5 -2
  33. package/dist/messages/zh_CN.js +5 -2
  34. package/dist/mp/assets.d.ts +1 -0
  35. package/dist/mp/assets.js +27 -1
  36. package/dist/mp/externalClasses.d.ts +38 -2
  37. package/dist/mp/externalClasses.js +90 -4
  38. package/dist/mp/index.d.ts +4 -3
  39. package/dist/mp/index.js +11 -1
  40. package/dist/mp/plugin.d.ts +1 -0
  41. package/dist/mp/plugin.js +14 -1
  42. package/dist/mp/style.d.ts +1 -0
  43. package/dist/mp/style.js +8 -1
  44. package/dist/mp/usingComponents.d.ts +1 -0
  45. package/dist/mp/usingComponents.js +17 -1
  46. package/dist/postcss/index.d.ts +2 -0
  47. package/dist/postcss/index.js +3 -1
  48. package/dist/postcss/plugins/stylePluginExternal.d.ts +17 -0
  49. package/dist/postcss/plugins/stylePluginExternal.js +127 -0
  50. package/dist/postcss/plugins/stylePluginScoped.js +30 -0
  51. package/dist/preprocess/context.js +2 -0
  52. package/dist/preprocess/index.d.ts +9 -6
  53. package/dist/preprocess/index.js +33 -8
  54. package/dist/resolve.js +5 -1
  55. package/dist/uni_modules.js +20 -4
  56. package/dist/utils.d.ts +2 -2
  57. package/dist/utils.js +9 -6
  58. package/dist/utsUtils.d.ts +1 -0
  59. package/dist/utsUtils.js +2 -1
  60. package/dist/vite/autoImport.js +91 -6
  61. package/dist/vite/plugins/console.js +1 -1
  62. package/dist/vite/plugins/cssScoped.js +2 -1
  63. package/dist/vite/plugins/easycom.js +7 -0
  64. package/dist/vite/plugins/json.js +69 -2
  65. package/dist/vite/plugins/pre.js +4 -2
  66. package/dist/vite/plugins/sfc.js +1 -1
  67. package/dist/vite/plugins/stats.js +32 -0
  68. package/dist/vite/plugins/uts/ext-api.js +1 -1
  69. package/dist/vite/plugins/uts/uni_modules.js +12 -0
  70. package/dist/vite/plugins/uts/uvue.js +7 -2
  71. package/dist/vite/plugins/vitejs/plugins/asset.d.ts +1 -0
  72. package/dist/vite/plugins/vitejs/plugins/asset.js +19 -1
  73. package/dist/vite/plugins/vitejs/plugins/css.d.ts +2 -1
  74. package/dist/vite/plugins/vitejs/plugins/css.js +27 -10
  75. package/dist/vite/utils/ast.d.ts +2 -1
  76. package/dist/vite/utils/ast.js +5 -1
  77. package/dist/vue/parse.d.ts +2 -0
  78. package/dist/vue/parse.js +3 -1
  79. package/dist/vue/transforms/index.d.ts +1 -0
  80. package/dist/vue/transforms/index.js +1 -0
  81. package/dist/vue/transforms/transformLineBreak.d.ts +2 -0
  82. package/dist/vue/transforms/transformLineBreak.js +15 -0
  83. package/dist/vue/transforms/transformTag.d.ts +1 -1
  84. package/dist/vue/transforms/transformTag.js +5 -0
  85. package/dist/vue/transforms/x/transformMPBuiltInTag.js +2 -2
  86. package/dist/vue/utils.js +8 -1
  87. package/lib/@vue/compiler-core/dist/compiler-core.cjs.js +42 -23
  88. package/lib/@vue/compiler-core/dist/compiler-core.cjs.prod.js +42 -23
  89. package/lib/@vue/compiler-core/dist/compiler-core.esm-bundler.js +39 -19
  90. package/lib/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +4635 -1024
  91. package/lib/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +8762 -7849
  92. package/lib/dom2/app/@vitejs/plugin-vue/LICENSE +21 -0
  93. package/lib/dom2/app/@vitejs/plugin-vue/README.md +278 -0
  94. package/lib/dom2/app/@vitejs/plugin-vue/dist/index.cjs +3353 -0
  95. package/lib/dom2/app/@vitejs/plugin-vue/dist/index.d.cts +113 -0
  96. package/lib/dom2/app/@vitejs/plugin-vue/dist/index.d.mts +111 -0
  97. package/lib/dom2/app/@vitejs/plugin-vue/dist/index.d.ts +113 -0
  98. package/lib/dom2/app/@vitejs/plugin-vue/dist/index.mjs +3338 -0
  99. package/lib/dom2/app/@vitejs/plugin-vue/package.json +50 -0
  100. package/lib/dom2/app/@vue/compiler-core/LICENSE +21 -0
  101. package/lib/dom2/app/@vue/compiler-core/README.md +1 -0
  102. package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.js +5492 -0
  103. package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.prod.js +5436 -0
  104. package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.d.ts +1187 -0
  105. package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.esm-bundler.js +4335 -0
  106. package/lib/dom2/app/@vue/compiler-core/index.js +7 -0
  107. package/lib/dom2/app/@vue/compiler-core/package.json +58 -0
  108. package/lib/dom2/app/@vue/compiler-dom/LICENSE +21 -0
  109. package/lib/dom2/app/@vue/compiler-dom/README.md +1 -0
  110. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.js +762 -0
  111. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +736 -0
  112. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.d.ts +73 -0
  113. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +5051 -0
  114. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +11 -0
  115. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +557 -0
  116. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.js +5234 -0
  117. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.prod.js +11 -0
  118. package/lib/dom2/app/@vue/compiler-dom/index.js +7 -0
  119. package/lib/dom2/app/@vue/compiler-dom/package.json +57 -0
  120. package/lib/dom2/app/@vue/compiler-sfc/LICENSE +21 -0
  121. package/lib/dom2/app/@vue/compiler-sfc/README.md +80 -0
  122. package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +15528 -0
  123. package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.d.ts +11595 -0
  124. package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +41525 -0
  125. package/lib/dom2/app/@vue/compiler-sfc/package.json +68 -0
  126. package/lib/dom2/app/@vue/compiler-vapor/LICENSE +21 -0
  127. package/lib/dom2/app/@vue/compiler-vapor/README.md +1 -0
  128. package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.cjs.js +3584 -0
  129. package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.d.ts +22858 -0
  130. package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.esm-browser.js +22438 -0
  131. package/lib/dom2/app/@vue/compiler-vapor/package.json +51 -0
  132. package/lib/dom2/app/@vue/compiler-vapor-dom2/dist/compiler-vapor-dom2.cjs.js +1 -0
  133. package/lib/dom2/app/@vue/compiler-vapor-dom2/package.json +56 -0
  134. package/lib/dom2/app/@vue/shared/LICENSE +21 -0
  135. package/lib/dom2/app/@vue/shared/README.md +3 -0
  136. package/lib/dom2/app/@vue/shared/dist/shared.cjs.js +773 -0
  137. package/lib/dom2/app/@vue/shared/dist/shared.cjs.prod.js +773 -0
  138. package/lib/dom2/app/@vue/shared/dist/shared.d.ts +412 -0
  139. package/lib/dom2/app/@vue/shared/dist/shared.esm-bundler.js +688 -0
  140. package/lib/dom2/app/@vue/shared/index.js +7 -0
  141. package/lib/dom2/app/@vue/shared/package.json +47 -0
  142. package/lib/preprocess/lib/preprocess.js +9 -3
  143. package/lib/vapor/@vue/compiler-core/dist/compiler-core.cjs.js +1 -1
  144. package/lib/vapor/@vue/compiler-core/dist/compiler-core.cjs.prod.js +1 -1
  145. package/package.json +8 -6
@@ -0,0 +1,113 @@
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 };
@@ -0,0 +1,111 @@
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 };
@@ -0,0 +1,113 @@
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 };