@vizejs/unplugin 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/babel.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_unplugin = require("./unplugin-BMwc3bUL.cjs");
1
+ const require_unplugin = require("./unplugin-BsA3s_G_.cjs");
2
2
  //#region src/babel.ts
3
3
  function vizeBabelPlugin(_api, rawOptions = {}) {
4
4
  const options = require_unplugin.normalizeOptions(rawOptions);
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-BMBg2ffv.mjs";
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
@@ -1,4 +1,4 @@
1
1
  //#region src/esbuild.ts
2
- var esbuild_default = require("./unplugin-BMwc3bUL.cjs").vizeUnplugin.esbuild;
2
+ var esbuild_default = require("./unplugin-BsA3s_G_.cjs").vizeUnplugin.esbuild;
3
3
  //#endregion
4
4
  module.exports = esbuild_default;
package/dist/esbuild.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as vizeUnplugin } from "./unplugin-BMBg2ffv.mjs";
1
+ import { n as vizeUnplugin } from "./unplugin-DlBOlt7-.mjs";
2
2
  //#region src/esbuild.ts
3
3
  var esbuild_default = vizeUnplugin.esbuild;
4
4
  //#endregion
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-BMwc3bUL.cjs");
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-BMBg2ffv.mjs";
1
+ import { n as vizeUnplugin } from "./unplugin-DlBOlt7-.mjs";
2
2
  export { vizeUnplugin as default, vizeUnplugin };
package/dist/rolldown.cjs CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region src/rolldown.ts
2
- var rolldown_default = require("./unplugin-BMwc3bUL.cjs").vizeUnplugin.rollup;
2
+ var rolldown_default = require("./unplugin-BsA3s_G_.cjs").vizeUnplugin.rollup;
3
3
  //#endregion
4
4
  module.exports = rolldown_default;
package/dist/rolldown.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as vizeUnplugin } from "./unplugin-BMBg2ffv.mjs";
1
+ import { n as vizeUnplugin } from "./unplugin-DlBOlt7-.mjs";
2
2
  //#region src/rolldown.ts
3
3
  var rolldown_default = vizeUnplugin.rollup;
4
4
  //#endregion
package/dist/rollup.cjs CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region src/rollup.ts
2
- var rollup_default = require("./unplugin-BMwc3bUL.cjs").vizeUnplugin.rollup;
2
+ var rollup_default = require("./unplugin-BsA3s_G_.cjs").vizeUnplugin.rollup;
3
3
  //#endregion
4
4
  module.exports = rollup_default;
package/dist/rollup.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as vizeUnplugin } from "./unplugin-BMBg2ffv.mjs";
1
+ import { n as vizeUnplugin } from "./unplugin-DlBOlt7-.mjs";
2
2
  //#region src/rollup.ts
3
3
  var rollup_default = vizeUnplugin.rollup;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- const require_webpack_styles = require("./webpack-styles-BeXQWFdv.cjs");
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 { a as isPreprocessorLang, c as transformStyleVars, n as registerWebpackStyleRule, o as preprocessStyle, r as webpackStylePath, s as scopeCss, t as findVirtualModules } from "./webpack-styles-8kxctaA7.mjs";
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-BeXQWFdv.cjs");
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 { i as webpackStyleScope, s as scopeCss } from "./webpack-styles-8kxctaA7.mjs";
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 { isPreprocessorLang as a, transformStyleVars as c, webpackStyleScope as i, registerWebpackStyleRule as n, preprocessStyle as o, webpackStylePath as r, scopeCss as s, findVirtualModules as t };
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
@@ -1,4 +1,4 @@
1
1
  //#region src/webpack.ts
2
- var webpack_default = require("./unplugin-BMwc3bUL.cjs").vizeUnplugin.webpack;
2
+ var webpack_default = require("./unplugin-BsA3s_G_.cjs").vizeUnplugin.webpack;
3
3
  //#endregion
4
4
  module.exports = webpack_default;
package/dist/webpack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as vizeUnplugin } from "./unplugin-BMBg2ffv.mjs";
1
+ import { n as vizeUnplugin } from "./unplugin-DlBOlt7-.mjs";
2
2
  //#region src/webpack.ts
3
3
  var webpack_default = vizeUnplugin.webpack;
4
4
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/unplugin",
3
- "version": "0.479.0",
3
+ "version": "0.481.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.479.0",
71
+ "@vizejs/native": "0.481.0",
72
72
  "oxc-transform": "0.144.0",
73
73
  "unplugin": "3.3.0"
74
74
  },