@vizejs/unplugin 0.479.0 → 0.480.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 +1 -1
- package/dist/babel.mjs +1 -1
- package/dist/esbuild.cjs +1 -1
- package/dist/esbuild.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/rolldown.cjs +1 -1
- package/dist/rolldown.mjs +1 -1
- package/dist/rollup.cjs +1 -1
- package/dist/rollup.mjs +1 -1
- package/dist/{unplugin-BMwc3bUL.cjs → unplugin-BsA3s_G_.cjs} +2 -2
- package/dist/{unplugin-BMBg2ffv.mjs → unplugin-DlBOlt7-.mjs} +2 -2
- package/dist/webpack-style-loader.cjs +1 -1
- package/dist/webpack-style-loader.mjs +1 -1
- package/dist/{webpack-styles-BeXQWFdv.cjs → webpack-styles-BzhQ3HGs.cjs} +10 -0
- package/dist/{webpack-styles-8kxctaA7.mjs → webpack-styles-ClGUhlPP.mjs} +5 -1
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +2 -2
package/dist/babel.cjs
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-DlBOlt7-.mjs";
|
|
2
2
|
//#region src/babel.ts
|
|
3
3
|
function vizeBabelPlugin(_api, rawOptions = {}) {
|
|
4
4
|
const options = normalizeOptions(rawOptions);
|
package/dist/esbuild.cjs
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-BsA3s_G_.cjs");
|
|
6
6
|
exports.default = require_unplugin.vizeUnplugin;
|
|
7
7
|
exports.vizeUnplugin = require_unplugin.vizeUnplugin;
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as vizeUnplugin } from "./unplugin-
|
|
1
|
+
import { n as vizeUnplugin } from "./unplugin-DlBOlt7-.mjs";
|
|
2
2
|
export { vizeUnplugin as default, vizeUnplugin };
|
package/dist/rolldown.cjs
CHANGED
package/dist/rolldown.mjs
CHANGED
package/dist/rollup.cjs
CHANGED
package/dist/rollup.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_webpack_styles = require("./webpack-styles-
|
|
1
|
+
const require_webpack_styles = require("./webpack-styles-BzhQ3HGs.cjs");
|
|
2
2
|
let node_fs = require("node:fs");
|
|
3
3
|
node_fs = require_webpack_styles.__toESM(node_fs, 1);
|
|
4
4
|
let node_module = require("node:module");
|
|
@@ -532,7 +532,7 @@ const vizeUnplugin = (0, unplugin.createUnplugin)((rawOptions = {}, meta) => {
|
|
|
532
532
|
const stylePath = require_webpack_styles.webpackStylePath(id, block, scoped);
|
|
533
533
|
if (!virtualModules) throw new Error("[vize] webpack style blocks need the plugin's virtual modules.");
|
|
534
534
|
virtualModules.writeModule(stylePath, require_webpack_styles.transformStyleVars(block.content, compiled.scopeId));
|
|
535
|
-
return stylePath;
|
|
535
|
+
return require_webpack_styles.webpackStyleRequest(stylePath, block);
|
|
536
536
|
} : void 0
|
|
537
537
|
}), options.sourceMap);
|
|
538
538
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as scopeCss, i as webpackStyleRequest, l as transformStyleVars, n as registerWebpackStyleRule, o as isPreprocessorLang, r as webpackStylePath, s as preprocessStyle, t as findVirtualModules } from "./webpack-styles-ClGUhlPP.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import { createUnplugin } from "unplugin";
|
|
@@ -531,7 +531,7 @@ const vizeUnplugin = createUnplugin((rawOptions = {}, meta) => {
|
|
|
531
531
|
const stylePath = webpackStylePath(id, block, scoped);
|
|
532
532
|
if (!virtualModules) throw new Error("[vize] webpack style blocks need the plugin's virtual modules.");
|
|
533
533
|
virtualModules.writeModule(stylePath, transformStyleVars(block.content, compiled.scopeId));
|
|
534
|
-
return stylePath;
|
|
534
|
+
return webpackStyleRequest(stylePath, block);
|
|
535
535
|
} : void 0
|
|
536
536
|
}), options.sourceMap);
|
|
537
537
|
return {
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_webpack_styles = require("./webpack-styles-
|
|
5
|
+
const require_webpack_styles = require("./webpack-styles-BzhQ3HGs.cjs");
|
|
6
6
|
//#region src/webpack-style-loader.ts
|
|
7
7
|
const SCOPE_QUERY = "?scope";
|
|
8
8
|
const CSS_LOADER = /(?:^|[/\\])css-loader(?:[/\\]|$)/;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as webpackStyleScope, c as scopeCss } from "./webpack-styles-ClGUhlPP.mjs";
|
|
2
2
|
//#region src/webpack-style-loader.ts
|
|
3
3
|
const SCOPE_QUERY = "?scope";
|
|
4
4
|
const CSS_LOADER = /(?:^|[/\\])css-loader(?:[/\\]|$)/;
|
|
@@ -77,6 +77,10 @@ function webpackStylePath(filePath, block, scoped) {
|
|
|
77
77
|
const module = block.module === false ? "" : ".module";
|
|
78
78
|
return `${filePath}.__vize_style_${block.index}${scope}${module}.${block.lang ?? "css"}`;
|
|
79
79
|
}
|
|
80
|
+
function webpackStyleRequest(stylePath, block) {
|
|
81
|
+
if (block.module === false) return stylePath;
|
|
82
|
+
return typeof block.module === "string" ? `${stylePath}?module=${encodeURIComponent(block.module)}` : `${stylePath}?module`;
|
|
83
|
+
}
|
|
80
84
|
function webpackStyleScope(resourcePath) {
|
|
81
85
|
return SCOPED_STYLE_FILE.exec(resourcePath)?.[1] ?? null;
|
|
82
86
|
}
|
|
@@ -140,6 +144,12 @@ Object.defineProperty(exports, "webpackStylePath", {
|
|
|
140
144
|
return webpackStylePath;
|
|
141
145
|
}
|
|
142
146
|
});
|
|
147
|
+
Object.defineProperty(exports, "webpackStyleRequest", {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
get: function() {
|
|
150
|
+
return webpackStyleRequest;
|
|
151
|
+
}
|
|
152
|
+
});
|
|
143
153
|
Object.defineProperty(exports, "webpackStyleScope", {
|
|
144
154
|
enumerable: true,
|
|
145
155
|
get: function() {
|
|
@@ -54,6 +54,10 @@ function webpackStylePath(filePath, block, scoped) {
|
|
|
54
54
|
const module = block.module === false ? "" : ".module";
|
|
55
55
|
return `${filePath}.__vize_style_${block.index}${scope}${module}.${block.lang ?? "css"}`;
|
|
56
56
|
}
|
|
57
|
+
function webpackStyleRequest(stylePath, block) {
|
|
58
|
+
if (block.module === false) return stylePath;
|
|
59
|
+
return typeof block.module === "string" ? `${stylePath}?module=${encodeURIComponent(block.module)}` : `${stylePath}?module`;
|
|
60
|
+
}
|
|
57
61
|
function webpackStyleScope(resourcePath) {
|
|
58
62
|
return SCOPED_STYLE_FILE.exec(resourcePath)?.[1] ?? null;
|
|
59
63
|
}
|
|
@@ -69,4 +73,4 @@ function registerWebpackStyleRule(compiler) {
|
|
|
69
73
|
});
|
|
70
74
|
}
|
|
71
75
|
//#endregion
|
|
72
|
-
export {
|
|
76
|
+
export { webpackStyleScope as a, scopeCss as c, webpackStyleRequest as i, transformStyleVars as l, registerWebpackStyleRule as n, isPreprocessorLang as o, webpackStylePath as r, preprocessStyle as s, findVirtualModules as t };
|
package/dist/webpack.cjs
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.480.0",
|
|
4
4
|
"description": "Experimental Vue SFC integrations for Rollup, Rolldown, Webpack, esbuild, and Babel powered by Vize",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"babel",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@vizejs/native": "0.
|
|
71
|
+
"@vizejs/native": "0.480.0",
|
|
72
72
|
"oxc-transform": "0.144.0",
|
|
73
73
|
"unplugin": "3.3.0"
|
|
74
74
|
},
|