@vizejs/vite-plugin 0.479.0 → 0.481.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-DtrTTtew.mjs";
1
+ import { t as vize } from "./plugin-BJpHdKQz.mjs";
2
2
  import { l as rewriteStaticAssetUrls } from "./vue-version-BUu5UzZ5.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-DE1fZbgD.mjs";
4
4
  //#region src/index.ts
@@ -578,8 +578,15 @@ function hasDelegatedStyles(compiled) {
578
578
  if (!compiled.styles) return false;
579
579
  return compiled.styles.some((s) => needsPreprocessor(s) || isCssModule(s) || needsCssPipeline(s));
580
580
  }
581
+ /**
582
+ * Template-only HMR swaps in `updated.render`, so the render function must be
583
+ * standalone rather than the closure an inline-template `setup` returns.
584
+ * Script setup attaches it as `render: _sfc_render` in the component literal;
585
+ * other shapes assign `_sfc_main.render = _sfc_render` (or `= render`).
586
+ */
587
+ const STANDALONE_RENDER = /(?:^|\n)(?:(?:_sfc_main|__sfc__)\.render\s*=\s*(?:_sfc_render|render)\b|\s+render:\s*_sfc_render\b)/m;
581
588
  function supportsTemplateOnlyHmr(output) {
582
- return /(?:^|\n)(?:_sfc_main|__sfc__)\.render\s*=\s*render\b/m.test(output);
589
+ return STANDALONE_RENDER.test(output);
583
590
  }
584
591
  /**
585
592
  * Prepend a runtime `<style>` injection for plain CSS to a module's output.
@@ -0,0 +1,2 @@
1
+ import { t as vize } from "./plugin-BJpHdKQz.mjs";
2
+ export { vize };
@@ -306,7 +306,7 @@ function defineConfig(config = {}, integration = {}) {
306
306
  const legacy = compiler !== false && (await import("./vue-version-DGtIj1Bv.mjs")).isLegacyVueCompatibilityMode(compiler);
307
307
  const plugins = compiler === false || legacy ? [...vp.plugins ?? []] : await withoutVueCompiler(vp.plugins ?? []);
308
308
  if (compiler !== false) {
309
- const { vize } = await import("./plugin-VGQR_WGT.mjs");
309
+ const { vize } = await import("./plugin-C1ZHQliC.mjs");
310
310
  plugins.push(vize({
311
311
  ...compiler,
312
312
  configMode: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/vite-plugin",
3
- "version": "0.479.0",
3
+ "version": "0.481.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.479.0",
55
- "@vizejs/unplugin": "0.479.0",
54
+ "@vizejs/native": "0.481.0",
55
+ "@vizejs/unplugin": "0.481.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.479.0"
60
+ "vize": "0.481.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/node": "25.9.2",
@@ -1,2 +0,0 @@
1
- import { t as vize } from "./plugin-DtrTTtew.mjs";
2
- export { vize };