@vizejs/unplugin 0.717.0 → 0.718.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.cjs +2 -1
- package/dist/babel.d.cts +2 -1
- package/dist/babel.d.mts +2 -1
- package/dist/babel.mjs +2 -1
- package/dist/bun.cjs +1 -1
- package/dist/bun.d.cts +1 -1
- package/dist/bun.d.mts +1 -1
- package/dist/bun.mjs +1 -1
- package/dist/esbuild.cjs +1 -1
- package/dist/esbuild.d.cts +1 -1
- package/dist/esbuild.d.mts +1 -1
- package/dist/esbuild.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +1 -1
- package/dist/rolldown.cjs +1 -1
- package/dist/rolldown.d.cts +1 -1
- package/dist/rolldown.d.mts +1 -1
- package/dist/rolldown.mjs +1 -1
- package/dist/rollup.cjs +1 -1
- package/dist/rollup.d.cts +1 -1
- package/dist/rollup.d.mts +1 -1
- package/dist/rollup.mjs +1 -1
- package/dist/{types-DGWIbaKi.d.cts → types-Bimdnmqk.d.cts} +33 -1
- package/dist/{types-DGWIbaKi.d.mts → types-Bimdnmqk.d.mts} +33 -1
- package/dist/{unplugin-CpH93S1g.cjs → unplugin-C8orVKGG.cjs} +3 -0
- package/dist/{unplugin-BoI0KB8a.mjs → unplugin-PS4_hmGj.mjs} +3 -0
- package/dist/webpack-cjs.d.cts +1 -1
- package/dist/webpack-cjs.d.mts +1 -1
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +8 -8
package/dist/babel.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const require_unplugin = require("./unplugin-
|
|
1
|
+
const require_unplugin = require("./unplugin-C8orVKGG.cjs");
|
|
2
2
|
//#region src/babel.ts
|
|
3
|
+
/** Create the Babel parser adapter that compiles matched Vue SFCs through Vize. */
|
|
3
4
|
function vizeBabelPlugin(_api, rawOptions = {}) {
|
|
4
5
|
const options = require_unplugin.normalizeOptions(rawOptions);
|
|
5
6
|
const filter = require_unplugin.createFilter(options.include, options.exclude);
|
package/dist/babel.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as VizeUnpluginOptions } from "./types-
|
|
1
|
+
import { r as VizeUnpluginOptions } from "./types-Bimdnmqk.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/babel.d.ts
|
|
4
4
|
type BabelParserOptions = Record<string, unknown> & {
|
|
@@ -9,6 +9,7 @@ type BabelParserOptions = Record<string, unknown> & {
|
|
|
9
9
|
sourceType?: string;
|
|
10
10
|
};
|
|
11
11
|
type BabelParse = (code: string, options?: BabelParserOptions) => unknown;
|
|
12
|
+
/** Create the Babel parser adapter that compiles matched Vue SFCs through Vize. */
|
|
12
13
|
declare function vizeBabelPlugin(_api: unknown, rawOptions?: VizeUnpluginOptions): {
|
|
13
14
|
name: string;
|
|
14
15
|
manipulateOptions: (_options: unknown, parserOptions: BabelParserOptions) => void;
|
package/dist/babel.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as VizeUnpluginOptions } from "./types-
|
|
1
|
+
import { r as VizeUnpluginOptions } from "./types-Bimdnmqk.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/babel.d.ts
|
|
4
4
|
type BabelParserOptions = Record<string, unknown> & {
|
|
@@ -9,6 +9,7 @@ type BabelParserOptions = Record<string, unknown> & {
|
|
|
9
9
|
sourceType?: string;
|
|
10
10
|
};
|
|
11
11
|
type BabelParse = (code: string, options?: BabelParserOptions) => unknown;
|
|
12
|
+
/** Create the Babel parser adapter that compiles matched Vue SFCs through Vize. */
|
|
12
13
|
declare function vizeBabelPlugin(_api: unknown, rawOptions?: VizeUnpluginOptions): {
|
|
13
14
|
name: string;
|
|
14
15
|
manipulateOptions: (_options: unknown, parserOptions: BabelParserOptions) => void;
|
package/dist/babel.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
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-PS4_hmGj.mjs";
|
|
2
2
|
//#region src/babel.ts
|
|
3
|
+
/** Create the Babel parser adapter that compiles matched Vue SFCs through Vize. */
|
|
3
4
|
function vizeBabelPlugin(_api, rawOptions = {}) {
|
|
4
5
|
const options = normalizeOptions(rawOptions);
|
|
5
6
|
const filter = createFilter(options.include, options.exclude);
|
package/dist/bun.cjs
CHANGED
package/dist/bun.d.cts
CHANGED
package/dist/bun.d.mts
CHANGED
package/dist/bun.mjs
CHANGED
package/dist/esbuild.cjs
CHANGED
package/dist/esbuild.d.cts
CHANGED
package/dist/esbuild.d.mts
CHANGED
package/dist/esbuild.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,6 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_unplugin = require("./unplugin-
|
|
5
|
+
const require_unplugin = require("./unplugin-C8orVKGG.cjs");
|
|
6
6
|
exports.default = require_unplugin.vizeUnplugin;
|
|
7
7
|
exports.vizeUnplugin = require_unplugin.vizeUnplugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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-Bimdnmqk.cjs";
|
|
2
2
|
import { Compiler } from "webpack";
|
|
3
3
|
|
|
4
4
|
//#region src/unplugin.d.ts
|
|
5
5
|
type VizeUnpluginInput = VizeUnpluginOptions | undefined;
|
|
6
|
+
/** Cross-bundler Vize compiler plugin used to construct each host-specific adapter. */
|
|
6
7
|
declare const vizeUnplugin: import("unplugin").UnpluginInstance<VizeUnpluginInput, boolean>;
|
|
7
8
|
//#endregion
|
|
8
9
|
export { type MacroArtifact, type VizeCompatibilityOptions, type VizeUnpluginOptions, type VizeVueVersion, vizeUnplugin as default, vizeUnplugin };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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-Bimdnmqk.mjs";
|
|
2
2
|
import { Compiler } from "webpack";
|
|
3
3
|
|
|
4
4
|
//#region src/unplugin.d.ts
|
|
5
5
|
type VizeUnpluginInput = VizeUnpluginOptions | undefined;
|
|
6
|
+
/** Cross-bundler Vize compiler plugin used to construct each host-specific adapter. */
|
|
6
7
|
declare const vizeUnplugin: import("unplugin").UnpluginInstance<VizeUnpluginInput, boolean>;
|
|
7
8
|
//#endregion
|
|
8
9
|
export { type MacroArtifact, type VizeCompatibilityOptions, type VizeUnpluginOptions, type VizeVueVersion, vizeUnplugin as default, vizeUnplugin };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as vizeUnplugin } from "./unplugin-
|
|
1
|
+
import { n as vizeUnplugin } from "./unplugin-PS4_hmGj.mjs";
|
|
2
2
|
export { vizeUnplugin as default, vizeUnplugin };
|
package/dist/rolldown.cjs
CHANGED
package/dist/rolldown.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as VizeUnpluginOptions } from "./types-
|
|
1
|
+
import { r as VizeUnpluginOptions } from "./types-Bimdnmqk.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/rolldown.d.ts
|
|
4
4
|
declare const _default: (options?: VizeUnpluginOptions | undefined) => import("unplugin").RollupPlugin<any> | import("unplugin").RollupPlugin<any>[];
|
package/dist/rolldown.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as VizeUnpluginOptions } from "./types-
|
|
1
|
+
import { r as VizeUnpluginOptions } from "./types-Bimdnmqk.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/rolldown.d.ts
|
|
4
4
|
declare const _default: (options?: VizeUnpluginOptions | undefined) => import("unplugin").RollupPlugin<any> | import("unplugin").RollupPlugin<any>[];
|
package/dist/rolldown.mjs
CHANGED
package/dist/rollup.cjs
CHANGED
package/dist/rollup.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as VizeUnpluginOptions } from "./types-
|
|
1
|
+
import { r as VizeUnpluginOptions } from "./types-Bimdnmqk.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/rollup.d.ts
|
|
4
4
|
declare const _default: (options?: VizeUnpluginOptions | undefined) => import("unplugin").RollupPlugin<any> | import("unplugin").RollupPlugin<any>[];
|
package/dist/rollup.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as VizeUnpluginOptions } from "./types-
|
|
1
|
+
import { r as VizeUnpluginOptions } from "./types-Bimdnmqk.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/rollup.d.ts
|
|
4
4
|
declare const _default: (options?: VizeUnpluginOptions | undefined) => import("unplugin").RollupPlugin<any> | import("unplugin").RollupPlugin<any>[];
|
package/dist/rollup.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region src/types.d.ts
|
|
2
|
+
/** Generated compiler-macro artifact associated with one authored source range. */
|
|
2
3
|
interface MacroArtifact {
|
|
3
4
|
kind: string;
|
|
4
5
|
name: string;
|
|
@@ -8,19 +9,33 @@ interface MacroArtifact {
|
|
|
8
9
|
start: number;
|
|
9
10
|
end: number;
|
|
10
11
|
}
|
|
12
|
+
/** Public options shared by every `@vizejs/unplugin` host adapter. */
|
|
11
13
|
interface VizeUnpluginOptions {
|
|
14
|
+
/** Source patterns eligible for compilation. @default [/\.vue$/, /\.[jt]sx$/] */
|
|
12
15
|
include?: string | RegExp | Array<string | RegExp>;
|
|
16
|
+
/** Source patterns excluded from compilation. @default [/node_modules/] */
|
|
13
17
|
exclude?: string | RegExp | Array<string | RegExp>;
|
|
18
|
+
/** Host-runtime compatibility overrides. @default {} */
|
|
14
19
|
compatibility?: VizeCompatibilityOptions;
|
|
20
|
+
/** Emit production-oriented runtime code. @default process.env.NODE_ENV === "production" */
|
|
15
21
|
isProduction?: boolean;
|
|
22
|
+
/** Compile for server rendering. @default false */
|
|
16
23
|
ssr?: boolean;
|
|
24
|
+
/** Emit source maps. @default !isProduction */
|
|
17
25
|
sourceMap?: boolean;
|
|
26
|
+
/** Compiler output form. @default "module" */
|
|
18
27
|
mode?: "module" | "function";
|
|
28
|
+
/** Compile Vue SFCs for the Vapor runtime. @default false */
|
|
19
29
|
vapor?: boolean;
|
|
30
|
+
/** Enable experimental in-tag compiler comments. @default false */
|
|
20
31
|
experimentalInTagComments?: boolean;
|
|
32
|
+
/** Enable experimental patterned-template compilation. @default false */
|
|
21
33
|
experimentalPatternedTemplate?: boolean;
|
|
34
|
+
/** Enable experimental self-component resolution. @default false */
|
|
22
35
|
experimentalSelfComponent?: boolean;
|
|
36
|
+
/** Enable experimental strict slot children. @default false */
|
|
23
37
|
experimentalStrictSlotChildren?: boolean;
|
|
38
|
+
/** Enable experimental server-script blocks. @default false */
|
|
24
39
|
experimentalServerScript?: boolean;
|
|
25
40
|
/**
|
|
26
41
|
* Default output mode for `.jsx`/`.tsx` components without a `"use vue:*"`
|
|
@@ -29,22 +44,34 @@ interface VizeUnpluginOptions {
|
|
|
29
44
|
* @default "vdom"
|
|
30
45
|
*/
|
|
31
46
|
jsxMode?: "vdom" | "vapor";
|
|
32
|
-
/** JSX semantics; `"babel"` opts into @vue/babel-plugin-jsx compatibility. */
|
|
47
|
+
/** JSX semantics; `"babel"` opts into @vue/babel-plugin-jsx compatibility. @default "native" */
|
|
33
48
|
jsxCompat?: "native" | "babel";
|
|
49
|
+
/** Compile against the custom-renderer runtime contract. @default false */
|
|
34
50
|
customRenderer?: boolean;
|
|
51
|
+
/** Tag names compiled as custom elements. @default [] */
|
|
35
52
|
customElements?: string[];
|
|
53
|
+
/** Template parsing compatibility mode. @default "standard" */
|
|
36
54
|
templateSyntax?: VizeTemplateSyntax;
|
|
55
|
+
/** Module specifier used for Vue runtime helpers. @default "vue" */
|
|
37
56
|
runtimeModuleName?: string;
|
|
57
|
+
/** Global identifier used by function-mode output. @default "Vue" */
|
|
38
58
|
runtimeGlobalName?: string;
|
|
59
|
+
/** Host Vue compatibility target. @default 3 */
|
|
39
60
|
vueVersion?: VizeVueVersion;
|
|
61
|
+
/** Project root used to resolve style and source dependencies. @default process.cwd() */
|
|
40
62
|
root?: string;
|
|
63
|
+
/** Emit adapter debug details. @default false */
|
|
41
64
|
debug?: boolean;
|
|
42
65
|
}
|
|
66
|
+
/** Vue runtime versions supported by the bundler compatibility layer. */
|
|
43
67
|
type VizeVueVersion = 0.11 | 1 | 2 | "2.7" | 3 | "legacy";
|
|
68
|
+
/** Template parsing modes supported by the native compiler. */
|
|
44
69
|
type VizeTemplateSyntax = "standard" | "strict" | "quirks";
|
|
70
|
+
/** Host compiler and runtime compatibility overrides. */
|
|
45
71
|
interface VizeCompatibilityOptions {
|
|
46
72
|
/**
|
|
47
73
|
* Host Vue version. Vue 0.11/1/2/2.7 opt into host-compiler compatibility.
|
|
74
|
+
* @default 3
|
|
48
75
|
*/
|
|
49
76
|
vueVersion?: VizeVueVersion;
|
|
50
77
|
/**
|
|
@@ -54,14 +81,17 @@ interface VizeCompatibilityOptions {
|
|
|
54
81
|
hostCompiler?: boolean;
|
|
55
82
|
/**
|
|
56
83
|
* Enable function-body output for CDN/global Vue evaluation.
|
|
84
|
+
* @default false
|
|
57
85
|
*/
|
|
58
86
|
scriptSetupInStandalone?: boolean;
|
|
59
87
|
/**
|
|
60
88
|
* Allow Vapor output for Options API SFCs when vapor is enabled.
|
|
89
|
+
* @default false
|
|
61
90
|
*/
|
|
62
91
|
optionsApiVapor?: boolean;
|
|
63
92
|
/**
|
|
64
93
|
* Override the host Nuxt major when this option object is shared with Nuxt.
|
|
94
|
+
* @default undefined
|
|
65
95
|
*/
|
|
66
96
|
nuxtVersion?: 2 | 3 | 4 | 5;
|
|
67
97
|
/**
|
|
@@ -70,6 +100,8 @@ interface VizeCompatibilityOptions {
|
|
|
70
100
|
* Webpack 4 does not expose `compiler.webpack`, so the plugin resolves
|
|
71
101
|
* `DefinePlugin` from the host `webpack` package when this is `4` or when
|
|
72
102
|
* auto-detection sees a Webpack 4 compiler shape.
|
|
103
|
+
*
|
|
104
|
+
* @default undefined
|
|
73
105
|
*/
|
|
74
106
|
webpackVersion?: 4 | 5;
|
|
75
107
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region src/types.d.ts
|
|
2
|
+
/** Generated compiler-macro artifact associated with one authored source range. */
|
|
2
3
|
interface MacroArtifact {
|
|
3
4
|
kind: string;
|
|
4
5
|
name: string;
|
|
@@ -8,19 +9,33 @@ interface MacroArtifact {
|
|
|
8
9
|
start: number;
|
|
9
10
|
end: number;
|
|
10
11
|
}
|
|
12
|
+
/** Public options shared by every `@vizejs/unplugin` host adapter. */
|
|
11
13
|
interface VizeUnpluginOptions {
|
|
14
|
+
/** Source patterns eligible for compilation. @default [/\.vue$/, /\.[jt]sx$/] */
|
|
12
15
|
include?: string | RegExp | Array<string | RegExp>;
|
|
16
|
+
/** Source patterns excluded from compilation. @default [/node_modules/] */
|
|
13
17
|
exclude?: string | RegExp | Array<string | RegExp>;
|
|
18
|
+
/** Host-runtime compatibility overrides. @default {} */
|
|
14
19
|
compatibility?: VizeCompatibilityOptions;
|
|
20
|
+
/** Emit production-oriented runtime code. @default process.env.NODE_ENV === "production" */
|
|
15
21
|
isProduction?: boolean;
|
|
22
|
+
/** Compile for server rendering. @default false */
|
|
16
23
|
ssr?: boolean;
|
|
24
|
+
/** Emit source maps. @default !isProduction */
|
|
17
25
|
sourceMap?: boolean;
|
|
26
|
+
/** Compiler output form. @default "module" */
|
|
18
27
|
mode?: "module" | "function";
|
|
28
|
+
/** Compile Vue SFCs for the Vapor runtime. @default false */
|
|
19
29
|
vapor?: boolean;
|
|
30
|
+
/** Enable experimental in-tag compiler comments. @default false */
|
|
20
31
|
experimentalInTagComments?: boolean;
|
|
32
|
+
/** Enable experimental patterned-template compilation. @default false */
|
|
21
33
|
experimentalPatternedTemplate?: boolean;
|
|
34
|
+
/** Enable experimental self-component resolution. @default false */
|
|
22
35
|
experimentalSelfComponent?: boolean;
|
|
36
|
+
/** Enable experimental strict slot children. @default false */
|
|
23
37
|
experimentalStrictSlotChildren?: boolean;
|
|
38
|
+
/** Enable experimental server-script blocks. @default false */
|
|
24
39
|
experimentalServerScript?: boolean;
|
|
25
40
|
/**
|
|
26
41
|
* Default output mode for `.jsx`/`.tsx` components without a `"use vue:*"`
|
|
@@ -29,22 +44,34 @@ interface VizeUnpluginOptions {
|
|
|
29
44
|
* @default "vdom"
|
|
30
45
|
*/
|
|
31
46
|
jsxMode?: "vdom" | "vapor";
|
|
32
|
-
/** JSX semantics; `"babel"` opts into @vue/babel-plugin-jsx compatibility. */
|
|
47
|
+
/** JSX semantics; `"babel"` opts into @vue/babel-plugin-jsx compatibility. @default "native" */
|
|
33
48
|
jsxCompat?: "native" | "babel";
|
|
49
|
+
/** Compile against the custom-renderer runtime contract. @default false */
|
|
34
50
|
customRenderer?: boolean;
|
|
51
|
+
/** Tag names compiled as custom elements. @default [] */
|
|
35
52
|
customElements?: string[];
|
|
53
|
+
/** Template parsing compatibility mode. @default "standard" */
|
|
36
54
|
templateSyntax?: VizeTemplateSyntax;
|
|
55
|
+
/** Module specifier used for Vue runtime helpers. @default "vue" */
|
|
37
56
|
runtimeModuleName?: string;
|
|
57
|
+
/** Global identifier used by function-mode output. @default "Vue" */
|
|
38
58
|
runtimeGlobalName?: string;
|
|
59
|
+
/** Host Vue compatibility target. @default 3 */
|
|
39
60
|
vueVersion?: VizeVueVersion;
|
|
61
|
+
/** Project root used to resolve style and source dependencies. @default process.cwd() */
|
|
40
62
|
root?: string;
|
|
63
|
+
/** Emit adapter debug details. @default false */
|
|
41
64
|
debug?: boolean;
|
|
42
65
|
}
|
|
66
|
+
/** Vue runtime versions supported by the bundler compatibility layer. */
|
|
43
67
|
type VizeVueVersion = 0.11 | 1 | 2 | "2.7" | 3 | "legacy";
|
|
68
|
+
/** Template parsing modes supported by the native compiler. */
|
|
44
69
|
type VizeTemplateSyntax = "standard" | "strict" | "quirks";
|
|
70
|
+
/** Host compiler and runtime compatibility overrides. */
|
|
45
71
|
interface VizeCompatibilityOptions {
|
|
46
72
|
/**
|
|
47
73
|
* Host Vue version. Vue 0.11/1/2/2.7 opt into host-compiler compatibility.
|
|
74
|
+
* @default 3
|
|
48
75
|
*/
|
|
49
76
|
vueVersion?: VizeVueVersion;
|
|
50
77
|
/**
|
|
@@ -54,14 +81,17 @@ interface VizeCompatibilityOptions {
|
|
|
54
81
|
hostCompiler?: boolean;
|
|
55
82
|
/**
|
|
56
83
|
* Enable function-body output for CDN/global Vue evaluation.
|
|
84
|
+
* @default false
|
|
57
85
|
*/
|
|
58
86
|
scriptSetupInStandalone?: boolean;
|
|
59
87
|
/**
|
|
60
88
|
* Allow Vapor output for Options API SFCs when vapor is enabled.
|
|
89
|
+
* @default false
|
|
61
90
|
*/
|
|
62
91
|
optionsApiVapor?: boolean;
|
|
63
92
|
/**
|
|
64
93
|
* Override the host Nuxt major when this option object is shared with Nuxt.
|
|
94
|
+
* @default undefined
|
|
65
95
|
*/
|
|
66
96
|
nuxtVersion?: 2 | 3 | 4 | 5;
|
|
67
97
|
/**
|
|
@@ -70,6 +100,8 @@ interface VizeCompatibilityOptions {
|
|
|
70
100
|
* Webpack 4 does not expose `compiler.webpack`, so the plugin resolves
|
|
71
101
|
* `DefinePlugin` from the host `webpack` package when this is `4` or when
|
|
72
102
|
* auto-detection sees a Webpack 4 compiler shape.
|
|
103
|
+
*
|
|
104
|
+
* @default undefined
|
|
73
105
|
*/
|
|
74
106
|
webpackVersion?: 4 | 5;
|
|
75
107
|
}
|
|
@@ -706,6 +706,7 @@ function isLegacyVueVersion(version) {
|
|
|
706
706
|
function normalizeTemplateSyntax(templateSyntax) {
|
|
707
707
|
return templateSyntax ?? "standard";
|
|
708
708
|
}
|
|
709
|
+
/** Resolve every public adapter option to the values consumed by compiler hooks. */
|
|
709
710
|
function normalizeOptions(rawOptions = {}) {
|
|
710
711
|
const isProduction = rawOptions.isProduction ?? process.env.NODE_ENV === "production";
|
|
711
712
|
const compatibility = rawOptions.compatibility ?? {};
|
|
@@ -755,6 +756,7 @@ function resolveWebpackDefinePlugin(compiler, webpackVersion) {
|
|
|
755
756
|
return null;
|
|
756
757
|
}
|
|
757
758
|
}
|
|
759
|
+
/** Install Vue feature defines without overriding definitions already owned by the host. */
|
|
758
760
|
function injectWebpackVueDefines(compiler, isProduction, webpackVersion, definePluginConstructor) {
|
|
759
761
|
const DefinePlugin = definePluginConstructor ?? resolveWebpackDefinePlugin(compiler, webpackVersion);
|
|
760
762
|
if (!DefinePlugin) throw new Error("[vize] Could not resolve webpack DefinePlugin. Install webpack in the host project or disable the Vize compiler with compatibility.hostCompiler.");
|
|
@@ -769,6 +771,7 @@ function injectWebpackVueDefines(compiler, isProduction, webpackVersion, defineP
|
|
|
769
771
|
for (const [key, value] of Object.entries(definitions)) if (!existingDefines.has(key)) missingDefinitions[key] = value;
|
|
770
772
|
if (Object.keys(missingDefinitions).length > 0) new DefinePlugin(missingDefinitions).apply(compiler);
|
|
771
773
|
}
|
|
774
|
+
/** Cross-bundler Vize compiler plugin used to construct each host-specific adapter. */
|
|
772
775
|
const vizeUnplugin = (0, unplugin.createUnplugin)((rawOptions = {}, meta) => {
|
|
773
776
|
const options = normalizeOptions(rawOptions);
|
|
774
777
|
const filter = createFilter(options.include, options.exclude);
|
|
@@ -704,6 +704,7 @@ function isLegacyVueVersion(version) {
|
|
|
704
704
|
function normalizeTemplateSyntax(templateSyntax) {
|
|
705
705
|
return templateSyntax ?? "standard";
|
|
706
706
|
}
|
|
707
|
+
/** Resolve every public adapter option to the values consumed by compiler hooks. */
|
|
707
708
|
function normalizeOptions(rawOptions = {}) {
|
|
708
709
|
const isProduction = rawOptions.isProduction ?? process.env.NODE_ENV === "production";
|
|
709
710
|
const compatibility = rawOptions.compatibility ?? {};
|
|
@@ -753,6 +754,7 @@ function resolveWebpackDefinePlugin(compiler, webpackVersion) {
|
|
|
753
754
|
return null;
|
|
754
755
|
}
|
|
755
756
|
}
|
|
757
|
+
/** Install Vue feature defines without overriding definitions already owned by the host. */
|
|
756
758
|
function injectWebpackVueDefines(compiler, isProduction, webpackVersion, definePluginConstructor) {
|
|
757
759
|
const DefinePlugin = definePluginConstructor ?? resolveWebpackDefinePlugin(compiler, webpackVersion);
|
|
758
760
|
if (!DefinePlugin) throw new Error("[vize] Could not resolve webpack DefinePlugin. Install webpack in the host project or disable the Vize compiler with compatibility.hostCompiler.");
|
|
@@ -767,6 +769,7 @@ function injectWebpackVueDefines(compiler, isProduction, webpackVersion, defineP
|
|
|
767
769
|
for (const [key, value] of Object.entries(definitions)) if (!existingDefines.has(key)) missingDefinitions[key] = value;
|
|
768
770
|
if (Object.keys(missingDefinitions).length > 0) new DefinePlugin(missingDefinitions).apply(compiler);
|
|
769
771
|
}
|
|
772
|
+
/** Cross-bundler Vize compiler plugin used to construct each host-specific adapter. */
|
|
770
773
|
const vizeUnplugin = createUnplugin((rawOptions = {}, meta) => {
|
|
771
774
|
const options = normalizeOptions(rawOptions);
|
|
772
775
|
const filter = createFilter(options.include, options.exclude);
|
package/dist/webpack-cjs.d.cts
CHANGED
package/dist/webpack-cjs.d.mts
CHANGED
package/dist/webpack.cjs
CHANGED
package/dist/webpack.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as VizeUnpluginOptions } from "./types-
|
|
1
|
+
import { r as VizeUnpluginOptions } from "./types-Bimdnmqk.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/webpack.d.ts
|
|
4
4
|
declare const _default: (options?: VizeUnpluginOptions | undefined) => import("webpack").WebpackPluginInstance;
|
package/dist/webpack.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as VizeUnpluginOptions } from "./types-
|
|
1
|
+
import { r as VizeUnpluginOptions } from "./types-Bimdnmqk.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/webpack.d.ts
|
|
4
4
|
declare const _default: (options?: VizeUnpluginOptions | undefined) => import("webpack").WebpackPluginInstance;
|
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.718.0",
|
|
4
4
|
"description": "Experimental Vue SFC integrations for Rollup, Rolldown, Webpack, esbuild, Bun, and Babel powered by Vize",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"babel",
|
|
@@ -74,20 +74,20 @@
|
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@vizejs/native": "0.
|
|
78
|
-
"oxc-transform": "0.
|
|
79
|
-
"unplugin": "3.
|
|
77
|
+
"@vizejs/native": "0.718.0",
|
|
78
|
+
"oxc-transform": "0.157.0",
|
|
79
|
+
"unplugin": "3.7.0"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@tsdown/css": "0.22.14",
|
|
83
83
|
"@types/node": "25.9.2",
|
|
84
|
-
"esbuild": "0.28.
|
|
85
|
-
"rollup": "4.
|
|
84
|
+
"esbuild": "0.28.2",
|
|
85
|
+
"rollup": "4.68.0",
|
|
86
86
|
"tsdown": "0.22.14",
|
|
87
87
|
"typescript": "6.0.3",
|
|
88
88
|
"vite-plus": "0.1.24",
|
|
89
89
|
"vue": "3.6.0-beta.10",
|
|
90
|
-
"webpack": "5.
|
|
90
|
+
"webpack": "5.112.2"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"webpack": "^4.46.0 || ^5.0.0"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"check": "vp check src vite.config.ts",
|
|
113
113
|
"check:fix": "vp check --fix src vite.config.ts",
|
|
114
114
|
"fmt": "vp fmt --write src vite.config.ts",
|
|
115
|
-
"test": "node --test src/*.test.ts src/**/*.test.ts",
|
|
115
|
+
"test": "vp pack && node --test src/*.test.ts src/**/*.test.ts",
|
|
116
116
|
"test:update": "node --test --test-update-snapshots src/*.test.ts src/**/*.test.ts"
|
|
117
117
|
}
|
|
118
118
|
}
|