@vizejs/vite-plugin 0.264.0 → 0.268.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.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -0
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -2088,10 +2088,17 @@ function isLegacyVueCompatibilityMode(options) {
2088
2088
  const vueVersion = options.vueVersion ?? options.compatibility?.vueVersion;
2089
2089
  return (options.compatibility?.hostCompiler ?? isLegacyVueVersion(vueVersion)) && isLegacyVueVersion(vueVersion);
2090
2090
  }
2091
+ function hasHostVueSfcCompilerPlugin(plugins) {
2092
+ return plugins.some((plugin) => {
2093
+ const name = plugin.name;
2094
+ return name === "vite:vue" || name === "vite:vue2" || name.includes("plugin-vue") || name.includes("vue2");
2095
+ });
2096
+ }
2091
2097
  function createLegacyVueCompatibilityPlugin(options) {
2092
2098
  return {
2093
2099
  name: "vite-plugin-vize:legacy-vue-compat",
2094
2100
  configResolved(resolvedConfig) {
2101
+ if (!hasHostVueSfcCompilerPlugin(resolvedConfig.plugins)) throw new Error("vite-plugin-vize: legacy Vue host-compiler mode requires a host Vue SFC compiler plugin. Add @vitejs/plugin-vue2 (or your framework's Vue 2 Vite SFC plugin), or set compatibility.hostCompiler=false if this project can use Vize's compiler pipeline.");
2095
2102
  createLogger(options.debug ?? false).log(`Legacy Vue compatibility mode is active for ${resolvedConfig.root}; Vize will not compile .vue files.`);
2096
2103
  }
2097
2104
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/vite-plugin",
3
- "version": "0.264.0",
3
+ "version": "0.268.0",
4
4
  "description": "High-performance native Vite plugin for Vue SFC compilation powered by Vize",
5
5
  "keywords": [
6
6
  "compiler",
@@ -40,9 +40,9 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
- "@vizejs/native": "0.264.0",
43
+ "@vizejs/native": "0.268.0",
44
44
  "tinyglobby": "0.2.16",
45
- "vize": "0.264.0"
45
+ "vize": "0.268.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "25.9.2",