@vizejs/vite-plugin 0.662.0 → 0.664.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.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as vize } from "./plugin-
|
|
1
|
+
import { t as vize } from "./plugin-BNLDCUfA.mjs";
|
|
2
2
|
import { u as rewriteStaticAssetUrls } from "./vue-version-BFh0eI6J.mjs";
|
|
3
3
|
import { a as resolveViteConfigExport, i as resolveConfigExport, n as defineConfig, o as vizeConfigStore, r as loadConfig, t as VIZE_CONFIG_FILE_ENV } from "./config-LlMZcDZI.mjs";
|
|
4
4
|
//#region src/index.ts
|
|
@@ -3085,22 +3085,6 @@ function createVirtualTypeScriptTransformer(viteApi) {
|
|
|
3085
3085
|
throw new Error("Installed Vite does not expose transformWithOxc or transformWithEsbuild");
|
|
3086
3086
|
};
|
|
3087
3087
|
}
|
|
3088
|
-
/**
|
|
3089
|
-
* Report whether `realPath` names a module Vize's own compiler emitted.
|
|
3090
|
-
*
|
|
3091
|
-
* Vize's Rust emitter guarantees plain JavaScript for every module it produces
|
|
3092
|
-
* (`ensure_javascript_output` at the napi boundary), so re-running Vite's
|
|
3093
|
-
* TypeScript strip over emitter output is a pure re-print. Every emitted module
|
|
3094
|
-
* is recorded in one of the two environment caches, so cache membership is the
|
|
3095
|
-
* cheap, allocation-free proof that the code came from the emitter.
|
|
3096
|
-
*
|
|
3097
|
-
* The probe fails safe: a module the caches do not know about still gets the
|
|
3098
|
-
* strip, which keeps hand-written and malformed virtual modules behaving
|
|
3099
|
-
* exactly as they did before.
|
|
3100
|
-
*/
|
|
3101
|
-
function isVizeEmitterOutput(state, realPath) {
|
|
3102
|
-
return state.cache.has(realPath) || state.ssrCache.has(realPath);
|
|
3103
|
-
}
|
|
3104
3088
|
const transformVirtualTypeScript = createVirtualTypeScriptTransformer(vite);
|
|
3105
3089
|
function getOxcDumpPath(root, realPath) {
|
|
3106
3090
|
const dumpDir = path.resolve(root || process.cwd(), "node_modules", ".vize", "oxc-dumps");
|
|
@@ -3120,10 +3104,9 @@ function getVirtualModuleDefines(state, ssr) {
|
|
|
3120
3104
|
function formatUnknownError$1(error) {
|
|
3121
3105
|
return error instanceof Error ? error.message : String(error);
|
|
3122
3106
|
}
|
|
3123
|
-
async function transformVizeVirtualModule(state, code, realPath, ssr,
|
|
3124
|
-
const needsTsTransform = forceTypeScriptTransform || !isVizeEmitterOutput(state, realPath);
|
|
3107
|
+
async function transformVizeVirtualModule(state, code, realPath, ssr, isMacroArtifact = false) {
|
|
3125
3108
|
try {
|
|
3126
|
-
let transformed =
|
|
3109
|
+
let transformed = isMacroArtifact ? (await transformVirtualTypeScript(code, realPath)).code : code;
|
|
3127
3110
|
if (transformed.includes("import.meta.")) transformed = applyDefineReplacements(transformed, getVirtualModuleDefines(state, ssr));
|
|
3128
3111
|
return transformed === code ? null : {
|
|
3129
3112
|
code: transformed,
|
|
@@ -3886,15 +3869,14 @@ function createPostTransformPlugin(state) {
|
|
|
3886
3869
|
...state,
|
|
3887
3870
|
extractCss
|
|
3888
3871
|
}, id, compiled);
|
|
3889
|
-
|
|
3872
|
+
let transformed = generateOutput(compiled, {
|
|
3890
3873
|
isProduction: state.isProduction,
|
|
3891
3874
|
isDev: state.server !== null,
|
|
3892
3875
|
ssr: isSsr,
|
|
3893
3876
|
extractCss,
|
|
3894
3877
|
filePath: id
|
|
3895
|
-
})
|
|
3878
|
+
});
|
|
3896
3879
|
const defines = transformOptions?.ssr ? state.serverViteDefine : state.clientViteDefine;
|
|
3897
|
-
let transformed = result.code;
|
|
3898
3880
|
if (Object.keys(defines).length > 0) transformed = applyDefineReplacements(transformed, defines);
|
|
3899
3881
|
return {
|
|
3900
3882
|
code: transformed,
|
package/dist/vite-plus.mjs
CHANGED
|
@@ -400,7 +400,7 @@ function defineConfig(config = {}, integration = {}) {
|
|
|
400
400
|
const legacy = compiler !== false && (await import("./vue-version-DOjZaMiI.mjs")).isLegacyVueCompatibilityMode(compiler);
|
|
401
401
|
const plugins = compiler === false || legacy ? [...vp.plugins ?? []] : await withoutVueCompiler(vp.plugins ?? []);
|
|
402
402
|
if (compiler !== false) {
|
|
403
|
-
const { vize } = await import("./plugin-
|
|
403
|
+
const { vize } = await import("./plugin-C9YYGkLC.mjs");
|
|
404
404
|
plugins.push(vize({
|
|
405
405
|
...plugin,
|
|
406
406
|
configMode: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/vite-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.664.0",
|
|
4
4
|
"description": "High-performance native Vite plugin for Vue SFC compilation powered by Vize",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@vizejs/native": "0.
|
|
55
|
-
"@vizejs/unplugin": "0.
|
|
54
|
+
"@vizejs/native": "0.664.0",
|
|
55
|
+
"@vizejs/unplugin": "0.664.0",
|
|
56
56
|
"jsonc-parser": "^3.3.1",
|
|
57
57
|
"oxc-parser": "0.144.0",
|
|
58
58
|
"picomatch": "4.0.5",
|
|
59
59
|
"tinyglobby": "0.2.17",
|
|
60
|
-
"vize": "0.
|
|
60
|
+
"vize": "0.664.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/node": "25.9.2",
|
package/dist/plugin-C9HLsCVG.mjs
DELETED