@vizejs/vite-plugin 0.318.0 → 0.321.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/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as VizeVueVersion, c as VizeInspectorOptions, d as ResolvedVizeConfig, f as UserConfigExport, i as VizeOptions, l as ConfigEnv, n as MacroArtifact, o as VizeInspectorLintPlanProvider, p as VizeConfig, r as VizeCompatibilityOptions, s as VizeInspectorLintPlanRequest, t as CompiledModule, u as LoadConfigOptions } from "./types-
|
|
1
|
+
import { a as VizeVueVersion, c as VizeInspectorOptions, d as ResolvedVizeConfig, f as UserConfigExport, i as VizeOptions, l as ConfigEnv, n as MacroArtifact, o as VizeInspectorLintPlanProvider, p as VizeConfig, r as VizeCompatibilityOptions, s as VizeInspectorLintPlanRequest, t as CompiledModule, u as LoadConfigOptions } from "./types-CgsUGF1b.mjs";
|
|
2
2
|
import { Plugin } from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/virtual.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1028,6 +1028,7 @@ function compileJsxModule(filePath, source, options = {}) {
|
|
|
1028
1028
|
filename: filePath,
|
|
1029
1029
|
lang: filePath.endsWith(".tsx") ? "tsx" : "jsx",
|
|
1030
1030
|
jsxMode: options.jsxMode,
|
|
1031
|
+
jsxCompat: options.jsxCompat,
|
|
1031
1032
|
vapor: options.vapor ?? false,
|
|
1032
1033
|
sourceMap: options.sourceMap ?? false
|
|
1033
1034
|
});
|
|
@@ -2697,6 +2698,7 @@ function transformJsxRequest(state, code, id, options) {
|
|
|
2697
2698
|
const sourceMap = getCompileOptionsForRequest(state, ssr).sourceMap;
|
|
2698
2699
|
const { code: compiled, map, warnings } = compileJsxModule(realPath, code, {
|
|
2699
2700
|
jsxMode: state.mergedOptions.jsxMode,
|
|
2701
|
+
jsxCompat: state.mergedOptions.jsxCompat,
|
|
2700
2702
|
vapor: state.mergedOptions.vapor ?? false,
|
|
2701
2703
|
ssr,
|
|
2702
2704
|
sourceMap
|
|
@@ -3329,6 +3331,7 @@ function resolveExperimentalCompilerOptions(options, compilerConfig, config) {
|
|
|
3329
3331
|
return {
|
|
3330
3332
|
vapor: options.vapor ?? compilerConfig?.vapor ?? experimentals.vapor,
|
|
3331
3333
|
jsxMode: options.jsxMode ?? compilerConfig?.jsxMode ?? (experimentals.jsxVapor ? "vapor" : void 0),
|
|
3334
|
+
jsxCompat: options.jsxCompat ?? compilerConfig?.jsxCompat,
|
|
3332
3335
|
experimentalInTagComments: experimentals.inTagComments,
|
|
3333
3336
|
experimentalPatternedTemplate: experimentals.patternedTemplate,
|
|
3334
3337
|
experimentalServerScript: experimentals.serverScript
|
|
@@ -27,8 +27,16 @@ interface VizeConfig {
|
|
|
27
27
|
* Base config files or presets to compose
|
|
28
28
|
*/
|
|
29
29
|
extends?: string | string[];
|
|
30
|
+
/**
|
|
31
|
+
* Vue dialect profile for standalone HTML documents; when absent the dialect is detected structurally per document
|
|
32
|
+
*/
|
|
33
|
+
dialect?: "vue" | "petite-vue";
|
|
30
34
|
compiler?: CompilerConfig;
|
|
31
|
-
experimentals?:
|
|
35
|
+
experimentals?: {
|
|
36
|
+
[k: string]: boolean | {
|
|
37
|
+
[k: string]: unknown;
|
|
38
|
+
} | null;
|
|
39
|
+
};
|
|
32
40
|
vite?: VitePluginConfig;
|
|
33
41
|
linter?: LinterConfig;
|
|
34
42
|
typeChecker?: TypeCheckerConfig;
|
|
@@ -58,6 +66,10 @@ interface CompilerConfig {
|
|
|
58
66
|
* Default output mode for .jsx/.tsx components without a "use vue:*" directive
|
|
59
67
|
*/
|
|
60
68
|
jsxMode?: "vdom" | "vapor";
|
|
69
|
+
/**
|
|
70
|
+
* JSX semantics for projects migrating from @vue/babel-plugin-jsx
|
|
71
|
+
*/
|
|
72
|
+
jsxCompat?: "native" | "babel";
|
|
61
73
|
/**
|
|
62
74
|
* Treat lowercase non-HTML tags as custom renderer elements
|
|
63
75
|
*/
|
|
@@ -122,11 +134,11 @@ interface CompilerCompatibilityConfig {
|
|
|
122
134
|
*/
|
|
123
135
|
optionsApiVapor?: boolean;
|
|
124
136
|
/**
|
|
125
|
-
*
|
|
137
|
+
* Nuxt major line for opt-in Nuxt compatibility behavior
|
|
126
138
|
*/
|
|
127
139
|
nuxtVersion?: 2 | 3 | 4;
|
|
128
140
|
/**
|
|
129
|
-
*
|
|
141
|
+
* webpack major line for opt-in bundler compatibility behavior
|
|
130
142
|
*/
|
|
131
143
|
webpackVersion?: 4 | 5;
|
|
132
144
|
}
|
|
@@ -156,9 +168,13 @@ interface LinterConfig {
|
|
|
156
168
|
* Enable linting
|
|
157
169
|
*/
|
|
158
170
|
enabled?: boolean;
|
|
159
|
-
/**
|
|
171
|
+
/**
|
|
172
|
+
* Built-in lint preset
|
|
173
|
+
*/
|
|
160
174
|
preset?: "happy-path" | "opinionated" | "essential" | "incremental" | "ecosystem" | "nuxt";
|
|
161
|
-
/**
|
|
175
|
+
/**
|
|
176
|
+
* Enable native type-aware lint rules from the active lint configuration
|
|
177
|
+
*/
|
|
162
178
|
typeAware?: boolean;
|
|
163
179
|
/**
|
|
164
180
|
* Rules to enable/disable
|
|
@@ -166,6 +182,7 @@ interface LinterConfig {
|
|
|
166
182
|
rules?: {
|
|
167
183
|
[k: string]: "off" | "warn" | "error";
|
|
168
184
|
};
|
|
185
|
+
ruleOptions?: LintRuleOptions;
|
|
169
186
|
/**
|
|
170
187
|
* Category-level severity overrides
|
|
171
188
|
*/
|
|
@@ -178,6 +195,25 @@ interface LinterConfig {
|
|
|
178
195
|
security?: "off" | "warn" | "error";
|
|
179
196
|
};
|
|
180
197
|
}
|
|
198
|
+
interface LintRuleOptions {
|
|
199
|
+
"script/no-restricted-globals"?: NoRestrictedGlobalsOptions;
|
|
200
|
+
"script/no-restricted-members"?: NoRestrictedMembersOptions;
|
|
201
|
+
}
|
|
202
|
+
interface NoRestrictedGlobalsOptions {
|
|
203
|
+
globals?: RestrictedGlobal[];
|
|
204
|
+
}
|
|
205
|
+
interface RestrictedGlobal {
|
|
206
|
+
name: string;
|
|
207
|
+
message?: string;
|
|
208
|
+
}
|
|
209
|
+
interface NoRestrictedMembersOptions {
|
|
210
|
+
members?: RestrictedMember[];
|
|
211
|
+
}
|
|
212
|
+
interface RestrictedMember {
|
|
213
|
+
object: string;
|
|
214
|
+
property: string;
|
|
215
|
+
message?: string;
|
|
216
|
+
}
|
|
181
217
|
interface TypeCheckerConfig {
|
|
182
218
|
/**
|
|
183
219
|
* Enable type checking
|
|
@@ -215,7 +251,9 @@ interface TypeCheckerConfig {
|
|
|
215
251
|
* Check fallthrough attrs on multi-root templates
|
|
216
252
|
*/
|
|
217
253
|
checkFallthroughAttrs?: boolean;
|
|
218
|
-
/**
|
|
254
|
+
/**
|
|
255
|
+
* Resolve Vue 3 Options API template bindings during type checking
|
|
256
|
+
*/
|
|
219
257
|
optionsApi?: boolean;
|
|
220
258
|
/**
|
|
221
259
|
* Enable Vue 2.7 / Nuxt 2 Options API template binding support
|
|
@@ -229,7 +267,9 @@ interface TypeCheckerConfig {
|
|
|
229
267
|
* Path to tsconfig.json
|
|
230
268
|
*/
|
|
231
269
|
tsconfig?: string;
|
|
232
|
-
/**
|
|
270
|
+
/**
|
|
271
|
+
* Path to the Corsa executable. This is the canonical runtime key; tsgoPath is kept as a compatibility alias.
|
|
272
|
+
*/
|
|
233
273
|
corsaPath?: string;
|
|
234
274
|
/**
|
|
235
275
|
* Deprecated alias for typeChecker.corsaPath
|
|
@@ -564,8 +604,16 @@ interface VizeConfigEntry {
|
|
|
564
604
|
* Base config files or presets to compose
|
|
565
605
|
*/
|
|
566
606
|
extends?: string | string[];
|
|
607
|
+
/**
|
|
608
|
+
* Vue dialect profile for standalone HTML documents; when absent the dialect is detected structurally per document
|
|
609
|
+
*/
|
|
610
|
+
dialect?: "vue" | "petite-vue";
|
|
567
611
|
compiler?: CompilerConfig;
|
|
568
|
-
experimentals?:
|
|
612
|
+
experimentals?: {
|
|
613
|
+
[k: string]: boolean | {
|
|
614
|
+
[k: string]: unknown;
|
|
615
|
+
} | null;
|
|
616
|
+
};
|
|
569
617
|
vite?: VitePluginConfig;
|
|
570
618
|
linter?: LinterConfig;
|
|
571
619
|
typeChecker?: TypeCheckerConfig;
|
|
@@ -810,6 +858,13 @@ interface VizeOptions extends ExperimentalPluginOptions {
|
|
|
810
858
|
* @default "vdom"
|
|
811
859
|
*/
|
|
812
860
|
jsxMode?: "vdom" | "vapor";
|
|
861
|
+
/**
|
|
862
|
+
* JSX semantics for projects migrating from `@vue/babel-plugin-jsx`.
|
|
863
|
+
* `"native"` keeps Vize's defaults; `"babel"` opts into Babel-compatible
|
|
864
|
+
* behavior. Babel compatibility is only defined for VDOM output.
|
|
865
|
+
* @default "native"
|
|
866
|
+
*/
|
|
867
|
+
jsxCompat?: "native" | "babel";
|
|
813
868
|
/**
|
|
814
869
|
* Treat lowercase non-HTML tags as custom renderer elements instead of Vue components.
|
|
815
870
|
* Useful for TresJS and other custom renderers.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/vite-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.321.0",
|
|
4
4
|
"description": "High-performance native Vite plugin for Vue SFC compilation powered by Vize",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@vizejs/native": "0.
|
|
48
|
+
"@vizejs/native": "0.321.0",
|
|
49
49
|
"oxc-parser": "0.133.0",
|
|
50
50
|
"tinyglobby": "0.2.16",
|
|
51
|
-
"vize": "0.
|
|
51
|
+
"vize": "0.321.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "25.9.2",
|