@octohash/vite-config 0.3.4 → 0.5.0
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/README.md +8 -37
- package/dist/default-loading.html +55 -46
- package/dist/index.d.mts +142 -178
- package/dist/index.mjs +7726 -9952
- package/package.json +44 -40
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ pnpm add -D @octohash/vite-config
|
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Provides an application-focused Vite preset with suitable plugins. Manual configuration is rarely needed.
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
18
|
import { defineConfig } from '@octohash/vite-config'
|
|
@@ -32,7 +32,7 @@ export default defineConfig({
|
|
|
32
32
|
|
|
33
33
|
## Customization
|
|
34
34
|
|
|
35
|
-
The following is the top-level configuration (OptionsConfig) used to customize the Vite setup. It covers
|
|
35
|
+
The following is the top-level configuration (OptionsConfig) used to customize the Vite setup. It covers alias resolution, common plugins, and application-specific options.
|
|
36
36
|
|
|
37
37
|
```ts
|
|
38
38
|
interface OptionsConfig {
|
|
@@ -42,12 +42,6 @@ interface OptionsConfig {
|
|
|
42
42
|
* @default auto-detect based on `command === 'build'`
|
|
43
43
|
*/
|
|
44
44
|
isBuild?: boolean
|
|
45
|
-
/**
|
|
46
|
-
* Type of the project
|
|
47
|
-
*
|
|
48
|
-
* @default auto-detect based on the `index.html` file
|
|
49
|
-
*/
|
|
50
|
-
type?: ProjectType
|
|
51
45
|
/**
|
|
52
46
|
* Aliases used to replace values in `import` or `require` statements
|
|
53
47
|
* Paths are automatically resolved if needed
|
|
@@ -71,12 +65,6 @@ interface OptionsConfig {
|
|
|
71
65
|
* @default true
|
|
72
66
|
*/
|
|
73
67
|
license?: boolean | LicensePluginOptions
|
|
74
|
-
/**
|
|
75
|
-
* https://github.com/originjs/vite-plugin-federation
|
|
76
|
-
* Module federation
|
|
77
|
-
*/
|
|
78
|
-
federation?: FederationPluginOptions
|
|
79
|
-
|
|
80
68
|
// Application Plugin
|
|
81
69
|
/**
|
|
82
70
|
* https://github.com/chenxch/vite-plugin-dynamic-base
|
|
@@ -89,33 +77,16 @@ interface OptionsConfig {
|
|
|
89
77
|
* You can customize the root element and loading template
|
|
90
78
|
* Use `[app-loading-title]` as a placeholder to dynamically set the document title during loading`
|
|
91
79
|
*
|
|
92
|
-
* @default
|
|
80
|
+
* @default true
|
|
93
81
|
*/
|
|
94
82
|
appLoading?: boolean | AppLoadingPluginOptions
|
|
95
83
|
/**
|
|
96
84
|
* Injects metadata using `define`, accessible via `__VITE_APP_METADATA__`.
|
|
97
85
|
* Includes information such as author, build time, version, and more.
|
|
98
86
|
*
|
|
99
|
-
* @default
|
|
87
|
+
* @default true
|
|
100
88
|
*/
|
|
101
89
|
metadata?: boolean | MetadataPluginOptions
|
|
102
|
-
/**
|
|
103
|
-
* Generates an import map for the project.
|
|
104
|
-
* Based on https://github.com/jspm/vite-plugin-jspm, with extended CDN provider support and options for include/exclude.
|
|
105
|
-
*
|
|
106
|
-
* @default false
|
|
107
|
-
*/
|
|
108
|
-
importMap?: boolean | ImportMapPluginOptions
|
|
109
|
-
|
|
110
|
-
// Library Plugin
|
|
111
|
-
/**
|
|
112
|
-
* https://github.com/qmhc/vite-plugin-dts
|
|
113
|
-
* Generates declaration files from .ts or .vue source files
|
|
114
|
-
*
|
|
115
|
-
* @default auto-detect based on `projectType === 'lib'`
|
|
116
|
-
*/
|
|
117
|
-
dts?: boolean | DtsPluginOptions
|
|
118
|
-
|
|
119
90
|
// Vue Plugin
|
|
120
91
|
/**
|
|
121
92
|
* Enable Vue support
|
|
@@ -153,7 +124,7 @@ interface OptionsVue {
|
|
|
153
124
|
* Automatically imports commonly used APIs such as `vue`, `vue-router`, `pinia`, `@vueuse/core`, etc
|
|
154
125
|
* Also supports auto-importing UI components from libraries like `ant-design-vue`, `element-plus`, etc
|
|
155
126
|
*
|
|
156
|
-
* @default
|
|
127
|
+
* @default true
|
|
157
128
|
*/
|
|
158
129
|
imports?: boolean | VueImportsPluginOptions
|
|
159
130
|
/**
|
|
@@ -161,15 +132,15 @@ interface OptionsVue {
|
|
|
161
132
|
* Enabled by default when the project type is `app`
|
|
162
133
|
* The `directoryAsNamespace` option is enabled by default.
|
|
163
134
|
*
|
|
164
|
-
* @default
|
|
135
|
+
* @default true
|
|
165
136
|
*/
|
|
166
137
|
components?: boolean | VueComponentsPluginOptions
|
|
167
138
|
/**
|
|
168
|
-
* https://
|
|
139
|
+
* https://router.vuejs.org/guide/file-based-routing.html
|
|
169
140
|
* Enabled by default when the project type is `app`
|
|
170
141
|
* Folder(s) to scan for files and generate routes. Defaults to scanning the pages directory.
|
|
171
142
|
*
|
|
172
|
-
* @default
|
|
143
|
+
* @default true
|
|
173
144
|
*/
|
|
174
145
|
pages?: boolean | VuePagesPluginOptions
|
|
175
146
|
}
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.loading {
|
|
8
|
+
--app-loading-background: #fff;
|
|
9
|
+
--app-loading-foreground: #000;
|
|
10
|
+
|
|
8
11
|
position: fixed;
|
|
9
12
|
top: 0;
|
|
10
13
|
left: 0;
|
|
@@ -16,7 +19,8 @@
|
|
|
16
19
|
width: 100%;
|
|
17
20
|
height: 100%;
|
|
18
21
|
overflow: hidden;
|
|
19
|
-
|
|
22
|
+
color: var(--app-loading-foreground);
|
|
23
|
+
background-color: var(--app-loading-background);
|
|
20
24
|
|
|
21
25
|
/* transition: all 0.8s ease-out; */
|
|
22
26
|
}
|
|
@@ -29,81 +33,86 @@
|
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
.dark .loading {
|
|
32
|
-
background: #
|
|
36
|
+
--app-loading-background: #000;
|
|
37
|
+
--app-loading-foreground: #fff;
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
.title {
|
|
36
|
-
margin-top:
|
|
41
|
+
margin-top: 64px;
|
|
37
42
|
font-size: 28px;
|
|
38
43
|
font-weight: 600;
|
|
39
|
-
color:
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.dark .title {
|
|
43
|
-
color: #fff;
|
|
44
|
+
color: var(--app-loading-foreground);
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
.loader {
|
|
47
48
|
position: relative;
|
|
48
|
-
width:
|
|
49
|
-
height:
|
|
49
|
+
width: 2.5em;
|
|
50
|
+
height: 2.5em;
|
|
51
|
+
font-size: 20px;
|
|
52
|
+
color: var(--app-loading-foreground);
|
|
53
|
+
transform: rotate(165deg);
|
|
50
54
|
}
|
|
51
55
|
|
|
52
|
-
.loader::before
|
|
56
|
+
.loader::before,
|
|
57
|
+
.loader::after {
|
|
53
58
|
position: absolute;
|
|
54
|
-
top:
|
|
55
|
-
left:
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
top: 50%;
|
|
60
|
+
left: 50%;
|
|
61
|
+
display: block;
|
|
62
|
+
width: 0.5em;
|
|
63
|
+
height: 0.5em;
|
|
58
64
|
content: '';
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
animation: shadow-ani 0.5s linear infinite;
|
|
65
|
+
border-radius: 0.25em;
|
|
66
|
+
transform: translate(-50%, -50%);
|
|
62
67
|
}
|
|
63
68
|
|
|
64
|
-
.loader::
|
|
65
|
-
|
|
66
|
-
top: 0;
|
|
67
|
-
left: 0;
|
|
68
|
-
width: 100%;
|
|
69
|
-
height: 100%;
|
|
70
|
-
content: '';
|
|
71
|
-
background: hsl(var(--primary, 212 100% 45%));
|
|
72
|
-
border-radius: 4px;
|
|
73
|
-
animation: jump-ani 0.5s linear infinite;
|
|
69
|
+
.loader::before {
|
|
70
|
+
animation: before8 2s infinite;
|
|
74
71
|
}
|
|
75
72
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
73
|
+
.loader::after {
|
|
74
|
+
animation: after6 2s infinite;
|
|
75
|
+
}
|
|
80
76
|
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
@keyframes before8 {
|
|
78
|
+
0% {
|
|
79
|
+
width: 0.5em;
|
|
80
|
+
box-shadow: 1em -0.5em currentColor, -1em 0.5em currentColor;
|
|
83
81
|
}
|
|
84
82
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
35% {
|
|
84
|
+
width: 2.5em;
|
|
85
|
+
box-shadow: 0 -0.5em currentColor, 0 0.5em currentColor;
|
|
88
86
|
}
|
|
89
87
|
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
70% {
|
|
89
|
+
width: 0.5em;
|
|
90
|
+
box-shadow: -1em -0.5em currentColor, 1em 0.5em currentColor;
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
100% {
|
|
95
|
-
|
|
94
|
+
box-shadow: 1em -0.5em currentColor, -1em 0.5em currentColor;
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
97
|
|
|
99
|
-
@keyframes
|
|
100
|
-
0
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
@keyframes after6 {
|
|
99
|
+
0% {
|
|
100
|
+
height: 0.5em;
|
|
101
|
+
box-shadow: 0.5em 1em currentColor, -0.5em -1em currentColor;
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
35% {
|
|
105
|
+
height: 2.5em;
|
|
106
|
+
box-shadow: 0.5em 0 currentColor, -0.5em 0 currentColor;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
70% {
|
|
110
|
+
height: 0.5em;
|
|
111
|
+
box-shadow: 0.5em -1em currentColor, -0.5em 1em currentColor;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
100% {
|
|
115
|
+
box-shadow: 0.5em 1em currentColor, -0.5em -1em currentColor;
|
|
107
116
|
}
|
|
108
117
|
}
|
|
109
118
|
</style>
|
package/dist/index.d.mts
CHANGED
|
@@ -1,195 +1,159 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Options as Options$
|
|
7
|
-
import { Options as Options$2 } from 'unplugin-vue-router';
|
|
8
|
-
import { PluginOptions } from 'vite-plugin-dts';
|
|
9
|
-
import { VitePluginVueDevToolsOptions } from 'vite-plugin-vue-devtools';
|
|
10
|
-
import { GeneratorOptions } from '@jspm/generator';
|
|
1
|
+
import { AliasOptions, PluginOption, UserConfig } from "vite";
|
|
2
|
+
import { PluginOptions } from "@intlify/unplugin-vue-i18n";
|
|
3
|
+
import { Options } from "unplugin-auto-import/types";
|
|
4
|
+
import { Options as Options$1 } from "unplugin-vue-components";
|
|
5
|
+
import { VitePluginVueDevToolsOptions } from "vite-plugin-vue-devtools";
|
|
6
|
+
import { Options as Options$2 } from "vue-router/unplugin";
|
|
11
7
|
|
|
8
|
+
//#region src/plugins/app-loading/index.d.ts
|
|
12
9
|
interface AppLoadingPluginOptions {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
container?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
filepath?: string;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
downloadDeps?: boolean;
|
|
20
|
-
debug?: boolean;
|
|
21
|
-
defaultProvider?: 'jspm.io' | 'jsdelivr' | 'unpkg' | 'esm.sh';
|
|
22
|
-
include?: string[];
|
|
23
|
-
exclude?: string[];
|
|
24
|
-
}
|
|
25
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/plugins/license.d.ts
|
|
26
16
|
interface LicensePluginOptions {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
17
|
+
name?: string;
|
|
18
|
+
author?: string;
|
|
19
|
+
version?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
homepage?: string;
|
|
22
|
+
license?: string;
|
|
23
|
+
contact?: string;
|
|
24
|
+
copyright?: {
|
|
25
|
+
holder?: string;
|
|
26
|
+
year?: string | number;
|
|
27
|
+
};
|
|
38
28
|
}
|
|
39
|
-
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/plugins/metadata.d.ts
|
|
40
31
|
interface MetadataPluginOptions {
|
|
41
|
-
|
|
32
|
+
extendMetadata?: Record<string, unknown>;
|
|
42
33
|
}
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/types.d.ts
|
|
45
36
|
interface CommonPluginOptions {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* https://github.com/originjs/vite-plugin-federation
|
|
68
|
-
* Module federation
|
|
69
|
-
*/
|
|
70
|
-
federation?: VitePluginFederationOptions;
|
|
37
|
+
/**
|
|
38
|
+
* https://github.com/KusStar/vite-bundle-visualizer
|
|
39
|
+
* By default template path is: ./node_modules/.cache/visualizer/stats.html
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
visualizer?: boolean | {
|
|
44
|
+
help?: boolean;
|
|
45
|
+
template?: 'treemap' | 'sunburst' | 'network';
|
|
46
|
+
output?: string;
|
|
47
|
+
open?: boolean;
|
|
48
|
+
config?: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Inject license info to output files
|
|
52
|
+
* Load license file from `package.json`, if it is a monorepo project, the root `package.json` will also be merged
|
|
53
|
+
*
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
license?: boolean | LicensePluginOptions;
|
|
71
57
|
}
|
|
72
58
|
interface AppPluginOptions {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Generates an import map for the project.
|
|
96
|
-
* Based on https://github.com/jspm/vite-plugin-jspm, with extended CDN provider support and options for include/exclude.
|
|
97
|
-
*
|
|
98
|
-
* @default false
|
|
99
|
-
*/
|
|
100
|
-
importMap?: boolean | ImportMapPluginOptions;
|
|
101
|
-
}
|
|
102
|
-
interface LibPluginOptions {
|
|
103
|
-
/**
|
|
104
|
-
* https://github.com/qmhc/vite-plugin-dts
|
|
105
|
-
* Generates declaration files from .ts or .vue source files
|
|
106
|
-
*
|
|
107
|
-
* @default auto-detect based on `projectType === 'lib'`
|
|
108
|
-
*/
|
|
109
|
-
dts?: boolean | PluginOptions;
|
|
59
|
+
/**
|
|
60
|
+
* https://github.com/chenxch/vite-plugin-dynamic-base
|
|
61
|
+
* If you want to build once and deploy to multiple environments, you can enable this plugin to set publicPath at runtime
|
|
62
|
+
* You can set like this: `dynamicBase: 'window.__dynamic_base__'`
|
|
63
|
+
*/
|
|
64
|
+
dynamicBase?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Inject app loading to `index.html`
|
|
67
|
+
* You can customize the root element and loading template
|
|
68
|
+
* Use `[app-loading-title]` as a placeholder to dynamically set the document title during loading`
|
|
69
|
+
*
|
|
70
|
+
* @default true
|
|
71
|
+
*/
|
|
72
|
+
appLoading?: boolean | AppLoadingPluginOptions;
|
|
73
|
+
/**
|
|
74
|
+
* Injects metadata using `define`, accessible via `__VITE_APP_METADATA__`.
|
|
75
|
+
* Includes information such as author, build time, version, and more.
|
|
76
|
+
*
|
|
77
|
+
* @default true
|
|
78
|
+
*/
|
|
79
|
+
metadata?: boolean | MetadataPluginOptions;
|
|
110
80
|
}
|
|
111
81
|
interface OptionsVue {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
82
|
+
/**
|
|
83
|
+
* https://github.com/vuejs/devtools
|
|
84
|
+
* Enable Vue Devtools
|
|
85
|
+
*
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
devtools?: boolean | VitePluginVueDevToolsOptions;
|
|
89
|
+
/**
|
|
90
|
+
* https://github.com/intlify/bundle-tools
|
|
91
|
+
* Enable Vue I18n
|
|
92
|
+
*
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
i18n?: boolean | PluginOptions;
|
|
96
|
+
/**
|
|
97
|
+
* https://github.com/unplugin/unplugin-auto-import
|
|
98
|
+
* Auto-imports commonly used APIs such as `vue`, `vue-router`, `pinia`, `@vueuse/core`, etc
|
|
99
|
+
* Also supports auto-importing UI components from libraries like `ant-design-vue`, `element-plus`, etc
|
|
100
|
+
* Files from `src/composables` and `src/utils` will also be auto-imported.
|
|
101
|
+
*
|
|
102
|
+
* @default true
|
|
103
|
+
*/
|
|
104
|
+
imports?: boolean | Options;
|
|
105
|
+
/**
|
|
106
|
+
* https://github.com/unplugin/unplugin-vue-components
|
|
107
|
+
* Enabled by default when the project type is `app`
|
|
108
|
+
* The `directoryAsNamespace` option is enabled by default.
|
|
109
|
+
*
|
|
110
|
+
* @default true
|
|
111
|
+
*/
|
|
112
|
+
components?: boolean | Options$1;
|
|
113
|
+
/**
|
|
114
|
+
* https://router.vuejs.org/guide/file-based-routing.html
|
|
115
|
+
* Enabled by default when the project type is `app`
|
|
116
|
+
* Folder(s) to scan for files and generate routes. Defaults to scanning the pages directory.
|
|
117
|
+
*
|
|
118
|
+
* @default true
|
|
119
|
+
*/
|
|
120
|
+
pages?: boolean | Options$2;
|
|
151
121
|
}
|
|
152
|
-
interface OptionsConfig extends CommonPluginOptions, AppPluginOptions
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Vite configuration override
|
|
181
|
-
*
|
|
182
|
-
* @default {}
|
|
183
|
-
*/
|
|
184
|
-
vite?: UserConfig;
|
|
122
|
+
interface OptionsConfig extends CommonPluginOptions, AppPluginOptions {
|
|
123
|
+
/**
|
|
124
|
+
* Whether to build for production
|
|
125
|
+
*
|
|
126
|
+
* @default auto-detect based on `command === 'build'`
|
|
127
|
+
*/
|
|
128
|
+
isBuild?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Aliases used to replace values in `import` or `require` statements
|
|
131
|
+
* Paths are automatically resolved if needed
|
|
132
|
+
*
|
|
133
|
+
* @default { "@": "./src" }
|
|
134
|
+
*/
|
|
135
|
+
alias?: AliasOptions;
|
|
136
|
+
/**
|
|
137
|
+
* Enable Vue support
|
|
138
|
+
* The goal is to provide an automatic registration mechanism similar to Nuxt in app development.
|
|
139
|
+
*
|
|
140
|
+
* @default auto-detect based on the dependencies
|
|
141
|
+
*/
|
|
142
|
+
vue?: boolean | OptionsVue;
|
|
143
|
+
/**
|
|
144
|
+
* Vite configuration override
|
|
145
|
+
*
|
|
146
|
+
* @default {}
|
|
147
|
+
*/
|
|
148
|
+
vite?: UserConfig;
|
|
185
149
|
}
|
|
186
150
|
interface ConditionPlugin {
|
|
187
|
-
|
|
188
|
-
|
|
151
|
+
condition?: boolean;
|
|
152
|
+
plugins: () => PluginOption[] | PromiseLike<PluginOption[]>;
|
|
189
153
|
}
|
|
190
154
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
export
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/index.d.ts
|
|
157
|
+
declare function defineConfig(options: OptionsConfig): import("vite").UserConfigFnPromise;
|
|
158
|
+
//#endregion
|
|
159
|
+
export { AppPluginOptions, CommonPluginOptions, ConditionPlugin, OptionsConfig, OptionsVue, ResolvedOptions, defineConfig };
|