@vizejs/vite-plugin 0.321.0 → 0.322.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
|
|
1
|
+
import { a as VizeVueVersion, c as VizeInspectorLintPlanRequest, d as LoadConfigOptions, f as ResolvedVizeConfig, i as VizeOptions, l as VizeInspectorOptions, m as VizeConfig, n as MacroArtifact, o as VizeVueFeatures, p as UserConfigExport, r as VizeCompatibilityOptions, s as VizeInspectorLintPlanProvider, t as CompiledModule, u as ConfigEnv } from "./types-dAZFEbN_.mjs";
|
|
2
2
|
import { Plugin } from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/virtual.d.ts
|
|
@@ -40,4 +40,4 @@ declare const __internal: {
|
|
|
40
40
|
rewriteStaticAssetUrls: typeof rewriteStaticAssetUrls;
|
|
41
41
|
};
|
|
42
42
|
//#endregion
|
|
43
|
-
export { type CompiledModule, type LoadConfigOptions, type MacroArtifact, type ResolvedVizeConfig, type UserConfigExport, VIZE_CONFIG_FILE_ENV, type VizeCompatibilityOptions, type VizeConfig, type VizeInspectorLintPlanProvider, type VizeInspectorLintPlanRequest, type VizeInspectorOptions, type VizeOptions, type VizeVueVersion, __internal, rewriteStaticAssetUrls as __internal_rewriteStaticAssetUrls, vize as default, vize, defineConfig, loadConfig, resolveConfigExport, vizeConfigStore };
|
|
43
|
+
export { type CompiledModule, type LoadConfigOptions, type MacroArtifact, type ResolvedVizeConfig, type UserConfigExport, VIZE_CONFIG_FILE_ENV, type VizeCompatibilityOptions, type VizeConfig, type VizeInspectorLintPlanProvider, type VizeInspectorLintPlanRequest, type VizeInspectorOptions, type VizeOptions, type VizeVueFeatures, type VizeVueVersion, __internal, rewriteStaticAssetUrls as __internal_rewriteStaticAssetUrls, vize as default, vize, defineConfig, loadConfig, resolveConfigExport, vizeConfigStore };
|
package/dist/index.mjs
CHANGED
|
@@ -3529,6 +3529,19 @@ function unregisterBuild(context) {
|
|
|
3529
3529
|
if (resolvedConfig) unregisterConfig(resolvedConfig);
|
|
3530
3530
|
}
|
|
3531
3531
|
//#endregion
|
|
3532
|
+
//#region src/plugin/vue-feature-defines.ts
|
|
3533
|
+
function parseDefine(value) {
|
|
3534
|
+
try {
|
|
3535
|
+
return typeof value === "string" ? JSON.parse(value) : value;
|
|
3536
|
+
} catch {
|
|
3537
|
+
return value;
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
/** Resolve the Options API runtime define with plugin-vue's precedence. */
|
|
3541
|
+
function resolveOptionsApiFlag(option, define) {
|
|
3542
|
+
return option ?? parseDefine(define) ?? true;
|
|
3543
|
+
}
|
|
3544
|
+
//#endregion
|
|
3532
3545
|
//#region src/plugin/index.ts
|
|
3533
3546
|
function aliasSortKey(find) {
|
|
3534
3547
|
return typeof find === "string" ? find.length : find.source.length;
|
|
@@ -3586,9 +3599,8 @@ function vize(options = {}) {
|
|
|
3586
3599
|
config(userConfig, env) {
|
|
3587
3600
|
patchCssModuleGenerateScopedName(userConfig);
|
|
3588
3601
|
return {
|
|
3589
|
-
// @vitejs/plugin-vue normally provides them; vize must do so as its replacement.
|
|
3590
3602
|
define: {
|
|
3591
|
-
__VUE_OPTIONS_API__:
|
|
3603
|
+
__VUE_OPTIONS_API__: resolveOptionsApiFlag(options.features?.optionsAPI, userConfig.define?.__VUE_OPTIONS_API__),
|
|
3592
3604
|
__VUE_PROD_DEVTOOLS__: env.command === "serve",
|
|
3593
3605
|
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
|
3594
3606
|
},
|
|
@@ -721,6 +721,17 @@ interface VizeInspectorOptions {
|
|
|
721
721
|
lintPlan?: VizeInspectorLintPlanProvider;
|
|
722
722
|
}
|
|
723
723
|
//#endregion
|
|
724
|
+
//#region src/vue-features.d.ts
|
|
725
|
+
/** Vue runtime feature flags shared with `@vitejs/plugin-vue`. */
|
|
726
|
+
interface VizeVueFeatures {
|
|
727
|
+
/**
|
|
728
|
+
* Set to `false` to allow Vue's Options API code to be tree-shaken from
|
|
729
|
+
* production bundles.
|
|
730
|
+
* @default true
|
|
731
|
+
*/
|
|
732
|
+
optionsAPI?: boolean;
|
|
733
|
+
}
|
|
734
|
+
//#endregion
|
|
724
735
|
//#region src/utils/module-output.d.ts
|
|
725
736
|
type ModuleOutputInfo = {
|
|
726
737
|
hasDefaultExport: boolean;
|
|
@@ -789,6 +800,8 @@ interface VizeOptions extends ExperimentalPluginOptions {
|
|
|
789
800
|
config?: UserConfigExport;
|
|
790
801
|
/** Development inspector integrations exposed through Vite's dev server. */
|
|
791
802
|
inspector?: VizeInspectorOptions;
|
|
803
|
+
/** Vue runtime feature flags compatible with `@vitejs/plugin-vue`. */
|
|
804
|
+
features?: VizeVueFeatures;
|
|
792
805
|
/**
|
|
793
806
|
* Vue major version for the host project.
|
|
794
807
|
*
|
|
@@ -968,4 +981,4 @@ interface CompiledModule {
|
|
|
968
981
|
moduleShape?: ModuleOutputInfo;
|
|
969
982
|
}
|
|
970
983
|
//#endregion
|
|
971
|
-
export { VizeVueVersion as a,
|
|
984
|
+
export { VizeVueVersion as a, VizeInspectorLintPlanRequest as c, LoadConfigOptions as d, ResolvedVizeConfig as f, VizeOptions as i, VizeInspectorOptions as l, VizeConfig as m, MacroArtifact as n, VizeVueFeatures as o, UserConfigExport as p, VizeCompatibilityOptions as r, VizeInspectorLintPlanProvider as s, CompiledModule as t, ConfigEnv as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/vite-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.322.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.322.0",
|
|
49
49
|
"oxc-parser": "0.133.0",
|
|
50
50
|
"tinyglobby": "0.2.16",
|
|
51
|
-
"vize": "0.
|
|
51
|
+
"vize": "0.322.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "25.9.2",
|