@vizejs/unplugin 0.177.0 → 0.179.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/babel.d.mts +1 -1
- package/dist/babel.mjs +1 -1
- package/dist/esbuild.d.mts +1 -1
- package/dist/esbuild.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/rolldown.d.mts +1 -1
- package/dist/rolldown.mjs +1 -1
- package/dist/rollup.d.mts +1 -1
- package/dist/rollup.mjs +1 -1
- package/dist/{types-oQVaBbVI.d.mts → types-B13SJWBj.d.mts} +2 -1
- package/dist/{unplugin-BhadWZfz.mjs → unplugin-B3sdC5nW.mjs} +9 -3
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +2 -2
package/dist/babel.d.mts
CHANGED
package/dist/babel.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createFilter, i as generateOutput, r as compileVueModule, t as normalizeOptions } from "./unplugin-
|
|
1
|
+
import { a as createFilter, i as generateOutput, r as compileVueModule, t as normalizeOptions } from "./unplugin-B3sdC5nW.mjs";
|
|
2
2
|
//#region src/babel.ts
|
|
3
3
|
function vizeBabelPlugin(_api, rawOptions = {}) {
|
|
4
4
|
const options = normalizeOptions(rawOptions);
|
package/dist/esbuild.d.mts
CHANGED
package/dist/esbuild.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as VizeVueVersion, n as VizeCompatibilityOptions, r as VizeUnpluginOptions, t as MacroArtifact } from "./types-
|
|
1
|
+
import { i as VizeVueVersion, n as VizeCompatibilityOptions, r as VizeUnpluginOptions, t as MacroArtifact } from "./types-B13SJWBj.mjs";
|
|
2
2
|
import * as _$unplugin from "unplugin";
|
|
3
3
|
//#region src/unplugin.d.ts
|
|
4
4
|
declare const vizeUnplugin: _$unplugin.UnpluginInstance<VizeUnpluginOptions | undefined, boolean>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as vizeUnplugin } from "./unplugin-
|
|
1
|
+
import { n as vizeUnplugin } from "./unplugin-B3sdC5nW.mjs";
|
|
2
2
|
export { vizeUnplugin as default, vizeUnplugin };
|
package/dist/rolldown.d.mts
CHANGED
package/dist/rolldown.mjs
CHANGED
package/dist/rollup.d.mts
CHANGED
package/dist/rollup.mjs
CHANGED
|
@@ -18,7 +18,7 @@ interface VizeUnpluginOptions {
|
|
|
18
18
|
mode?: "module" | "function";
|
|
19
19
|
vapor?: boolean;
|
|
20
20
|
customRenderer?: boolean;
|
|
21
|
-
|
|
21
|
+
templateSyntax?: VizeTemplateSyntax;
|
|
22
22
|
runtimeModuleName?: string;
|
|
23
23
|
runtimeGlobalName?: string;
|
|
24
24
|
vueVersion?: VizeVueVersion;
|
|
@@ -26,6 +26,7 @@ interface VizeUnpluginOptions {
|
|
|
26
26
|
debug?: boolean;
|
|
27
27
|
}
|
|
28
28
|
type VizeVueVersion = 0.11 | 1 | 2 | 3 | "legacy";
|
|
29
|
+
type VizeTemplateSyntax = "standard" | "strict" | "quirks";
|
|
29
30
|
interface VizeCompatibilityOptions {
|
|
30
31
|
/**
|
|
31
32
|
* Host Vue version. Vue 0.11/1/2 opt into host-compiler compatibility.
|
|
@@ -134,7 +134,7 @@ function buildSignature(options) {
|
|
|
134
134
|
options.ssr ? "1" : "0",
|
|
135
135
|
options.vapor ? "1" : "0",
|
|
136
136
|
options.customRenderer ? "1" : "0",
|
|
137
|
-
options.
|
|
137
|
+
options.templateSyntax,
|
|
138
138
|
options.sourceMap ? "1" : "0",
|
|
139
139
|
options.mode,
|
|
140
140
|
options.runtimeModuleName,
|
|
@@ -163,7 +163,7 @@ function compileVueModule(filePath, source, options, cache) {
|
|
|
163
163
|
ssr: options.ssr,
|
|
164
164
|
vapor: options.vapor,
|
|
165
165
|
customRenderer: options.customRenderer,
|
|
166
|
-
|
|
166
|
+
templateSyntax: options.templateSyntax,
|
|
167
167
|
runtimeModuleName: options.runtimeModuleName,
|
|
168
168
|
runtimeGlobalName: options.runtimeGlobalName,
|
|
169
169
|
vueVersion: String(options.vueVersion),
|
|
@@ -198,6 +198,7 @@ function isVueFile(id) {
|
|
|
198
198
|
return id.endsWith(".vue");
|
|
199
199
|
}
|
|
200
200
|
function isVueStyleRequest(id) {
|
|
201
|
+
if (!id.includes("?vue")) return false;
|
|
201
202
|
const { query } = parseVueRequest(id);
|
|
202
203
|
return query.vue && query.type === "style";
|
|
203
204
|
}
|
|
@@ -269,12 +270,16 @@ function normalizeVueVersion(version) {
|
|
|
269
270
|
function isLegacyVueVersion(version) {
|
|
270
271
|
return version === "legacy" || version === .11 || version === 1 || version === 2;
|
|
271
272
|
}
|
|
273
|
+
function normalizeTemplateSyntax(templateSyntax) {
|
|
274
|
+
return templateSyntax ?? "standard";
|
|
275
|
+
}
|
|
272
276
|
function normalizeOptions(rawOptions = {}) {
|
|
273
277
|
const isProduction = rawOptions.isProduction ?? process.env.NODE_ENV === "production";
|
|
274
278
|
const compatibility = rawOptions.compatibility ?? {};
|
|
275
279
|
const vueVersion = normalizeVueVersion(rawOptions.vueVersion ?? compatibility.vueVersion);
|
|
276
280
|
const mode = rawOptions.mode ?? (compatibility.scriptSetupInStandalone === true ? "function" : "module");
|
|
277
281
|
const hostCompiler = compatibility.hostCompiler ?? isLegacyVueVersion(vueVersion);
|
|
282
|
+
const templateSyntax = normalizeTemplateSyntax(rawOptions.templateSyntax);
|
|
278
283
|
return {
|
|
279
284
|
include: rawOptions.include,
|
|
280
285
|
exclude: rawOptions.exclude,
|
|
@@ -285,7 +290,7 @@ function normalizeOptions(rawOptions = {}) {
|
|
|
285
290
|
mode,
|
|
286
291
|
vapor: rawOptions.vapor ?? false,
|
|
287
292
|
customRenderer: rawOptions.customRenderer ?? false,
|
|
288
|
-
|
|
293
|
+
templateSyntax,
|
|
289
294
|
runtimeModuleName: rawOptions.runtimeModuleName ?? "vue",
|
|
290
295
|
runtimeGlobalName: rawOptions.runtimeGlobalName ?? "Vue",
|
|
291
296
|
vueVersion,
|
|
@@ -361,6 +366,7 @@ const vizeUnplugin = createUnplugin((rawOptions = {}) => {
|
|
|
361
366
|
},
|
|
362
367
|
transformInclude(id) {
|
|
363
368
|
if (options.hostCompiler) return false;
|
|
369
|
+
if (!id.includes(".vue")) return false;
|
|
364
370
|
const request = parseVueRequest(id);
|
|
365
371
|
return !request.query.vue && isVueFile(request.filename) && filter(request.filename);
|
|
366
372
|
},
|
package/dist/webpack.d.mts
CHANGED
package/dist/webpack.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/unplugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.179.0",
|
|
4
4
|
"description": "Experimental Vue SFC integrations for Rollup, Rolldown, Webpack, esbuild, and Babel powered by Vize",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"babel",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@vizejs/native": "0.
|
|
70
|
+
"@vizejs/native": "0.179.0",
|
|
71
71
|
"oxc-transform": "0.130.0",
|
|
72
72
|
"unplugin": "3.0.0"
|
|
73
73
|
},
|