@unocss/webpack 66.1.0 → 66.1.2

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/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const unplugin = require('./shared/webpack.Ca8MLDco.cjs');
3
+ const unplugin = require('./shared/webpack.DcWpBO5z.cjs');
4
4
  require('node:path');
5
5
  require('node:process');
6
6
  require('node:fs/promises');
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { u as unplugin } from './shared/webpack.BUzz5S1v.mjs';
1
+ import { u as unplugin } from './shared/webpack.B2MGSQtu.mjs';
2
2
  import 'node:path';
3
3
  import 'node:process';
4
4
  import 'node:fs/promises';
package/dist/rspack.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const unplugin = require('./shared/webpack.Ca8MLDco.cjs');
3
+ const unplugin = require('./shared/webpack.DcWpBO5z.cjs');
4
4
  require('node:path');
5
5
  require('node:process');
6
6
  require('node:fs/promises');
package/dist/rspack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { u as unplugin } from './shared/webpack.BUzz5S1v.mjs';
1
+ import { u as unplugin } from './shared/webpack.B2MGSQtu.mjs';
2
2
  import 'node:path';
3
3
  import 'node:process';
4
4
  import 'node:fs/promises';
@@ -140,7 +140,7 @@ async function setupContentExtractor(ctx, shouldWatch = false) {
140
140
  }
141
141
 
142
142
  const defaultPipelineExclude = [cssIdRE];
143
- const defaultPipelineInclude = [/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/];
143
+ const defaultPipelineInclude = [/\.(vue|svelte|[jt]sx|vine.ts|mdx?|astro|elm|php|phtml|html)($|\?)/];
144
144
 
145
145
  function deprecationCheck(config) {
146
146
  let warned = false;
@@ -423,7 +423,13 @@ function unplugin(configOrPath, defaults) {
423
423
  if (lastTokenSize === tokens.size)
424
424
  return;
425
425
  lastTokenSize = tokens.size;
426
- Array.from(plugin.__vfsModules).forEach((id) => {
426
+ let virtualModules;
427
+ if (plugin.__vfsModules instanceof Map) {
428
+ virtualModules = Array.from(plugin.__vfsModules.keys());
429
+ } else {
430
+ virtualModules = Array.from(plugin.__vfsModules);
431
+ }
432
+ virtualModules.forEach((id) => {
427
433
  let path = decodeURIComponent(id.startsWith(plugin.__virtualModulePrefix) ? id.slice(plugin.__virtualModulePrefix.length) : id);
428
434
  path = normalizeAbsolutePath(path);
429
435
  const layer = resolveLayer(path);
@@ -150,7 +150,7 @@ async function setupContentExtractor(ctx, shouldWatch = false) {
150
150
  }
151
151
 
152
152
  const defaultPipelineExclude = [core.cssIdRE];
153
- const defaultPipelineInclude = [/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/];
153
+ const defaultPipelineInclude = [/\.(vue|svelte|[jt]sx|vine.ts|mdx?|astro|elm|php|phtml|html)($|\?)/];
154
154
 
155
155
  function deprecationCheck(config) {
156
156
  let warned = false;
@@ -433,7 +433,13 @@ function unplugin(configOrPath, defaults) {
433
433
  if (lastTokenSize === tokens.size)
434
434
  return;
435
435
  lastTokenSize = tokens.size;
436
- Array.from(plugin.__vfsModules).forEach((id) => {
436
+ let virtualModules;
437
+ if (plugin.__vfsModules instanceof Map) {
438
+ virtualModules = Array.from(plugin.__vfsModules.keys());
439
+ } else {
440
+ virtualModules = Array.from(plugin.__vfsModules);
441
+ }
442
+ virtualModules.forEach((id) => {
437
443
  let path = decodeURIComponent(id.startsWith(plugin.__virtualModulePrefix) ? id.slice(plugin.__virtualModulePrefix.length) : id);
438
444
  path = normalizeAbsolutePath(path);
439
445
  const layer = resolveLayer(path);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/webpack",
3
3
  "type": "module",
4
- "version": "66.1.0",
4
+ "version": "66.1.2",
5
5
  "description": "The Webpack plugin for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -65,11 +65,11 @@
65
65
  "magic-string": "^0.30.17",
66
66
  "pathe": "^2.0.3",
67
67
  "tinyglobby": "^0.2.13",
68
- "unplugin": "^2.3.2",
68
+ "unplugin": "^2.3.4",
69
69
  "unplugin-utils": "^0.2.4",
70
70
  "webpack-sources": "^3.2.3",
71
- "@unocss/config": "66.1.0",
72
- "@unocss/core": "66.1.0"
71
+ "@unocss/config": "66.1.2",
72
+ "@unocss/core": "66.1.2"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@types/webpack": "^5.28.5",