@unocss/webpack 65.4.3 → 66.0.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/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const unplugin = require('./shared/webpack.
|
|
3
|
+
const unplugin = require('./shared/webpack.BNCBy5IG.cjs');
|
|
4
4
|
require('node:path');
|
|
5
5
|
require('node:process');
|
|
6
6
|
require('node:fs/promises');
|
|
@@ -8,8 +8,8 @@ require('tinyglobby');
|
|
|
8
8
|
require('@ampproject/remapping');
|
|
9
9
|
require('magic-string');
|
|
10
10
|
require('@unocss/core');
|
|
11
|
-
require('@rollup/pluginutils');
|
|
12
11
|
require('@unocss/config');
|
|
12
|
+
require('unplugin-utils');
|
|
13
13
|
require('node:crypto');
|
|
14
14
|
require('unplugin');
|
|
15
15
|
require('webpack-sources');
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as unplugin } from './shared/webpack.
|
|
1
|
+
import { u as unplugin } from './shared/webpack.C-uuNVzc.mjs';
|
|
2
2
|
import 'node:path';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'node:fs/promises';
|
|
@@ -6,8 +6,8 @@ import 'tinyglobby';
|
|
|
6
6
|
import '@ampproject/remapping';
|
|
7
7
|
import 'magic-string';
|
|
8
8
|
import '@unocss/core';
|
|
9
|
-
import '@rollup/pluginutils';
|
|
10
9
|
import '@unocss/config';
|
|
10
|
+
import 'unplugin-utils';
|
|
11
11
|
import 'node:crypto';
|
|
12
12
|
import 'unplugin';
|
|
13
13
|
import 'webpack-sources';
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const unplugin = require('./shared/webpack.
|
|
3
|
+
const unplugin = require('./shared/webpack.BNCBy5IG.cjs');
|
|
4
4
|
require('node:path');
|
|
5
5
|
require('node:process');
|
|
6
6
|
require('node:fs/promises');
|
|
@@ -8,8 +8,8 @@ require('tinyglobby');
|
|
|
8
8
|
require('@ampproject/remapping');
|
|
9
9
|
require('magic-string');
|
|
10
10
|
require('@unocss/core');
|
|
11
|
-
require('@rollup/pluginutils');
|
|
12
11
|
require('@unocss/config');
|
|
12
|
+
require('unplugin-utils');
|
|
13
13
|
require('node:crypto');
|
|
14
14
|
require('unplugin');
|
|
15
15
|
require('webpack-sources');
|
package/dist/rspack.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as unplugin } from './shared/webpack.
|
|
1
|
+
import { u as unplugin } from './shared/webpack.C-uuNVzc.mjs';
|
|
2
2
|
import 'node:path';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'node:fs/promises';
|
|
@@ -6,8 +6,8 @@ import 'tinyglobby';
|
|
|
6
6
|
import '@ampproject/remapping';
|
|
7
7
|
import 'magic-string';
|
|
8
8
|
import '@unocss/core';
|
|
9
|
-
import '@rollup/pluginutils';
|
|
10
9
|
import '@unocss/config';
|
|
10
|
+
import 'unplugin-utils';
|
|
11
11
|
import 'node:crypto';
|
|
12
12
|
import 'unplugin';
|
|
13
13
|
import 'webpack-sources';
|
|
@@ -7,8 +7,8 @@ const tinyglobby = require('tinyglobby');
|
|
|
7
7
|
const remapping = require('@ampproject/remapping');
|
|
8
8
|
const MagicString = require('magic-string');
|
|
9
9
|
const core = require('@unocss/core');
|
|
10
|
-
const pluginutils = require('@rollup/pluginutils');
|
|
11
10
|
const config = require('@unocss/config');
|
|
11
|
+
const unpluginUtils = require('unplugin-utils');
|
|
12
12
|
const node_crypto = require('node:crypto');
|
|
13
13
|
const unplugin$1 = require('unplugin');
|
|
14
14
|
const WebpackSources = require('webpack-sources');
|
|
@@ -173,7 +173,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
173
173
|
uno = r;
|
|
174
174
|
return r;
|
|
175
175
|
});
|
|
176
|
-
let rollupFilter =
|
|
176
|
+
let rollupFilter = unpluginUtils.createFilter(
|
|
177
177
|
defaultPipelineInclude,
|
|
178
178
|
defaultPipelineExclude,
|
|
179
179
|
{ resolve: typeof configOrPath === "string" ? configOrPath : root }
|
|
@@ -195,7 +195,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
195
195
|
configFileList = result.sources;
|
|
196
196
|
await uno.setConfig(rawConfig);
|
|
197
197
|
uno.config.envMode = "dev";
|
|
198
|
-
rollupFilter = rawConfig.content?.pipeline === false ? () => false :
|
|
198
|
+
rollupFilter = rawConfig.content?.pipeline === false ? () => false : unpluginUtils.createFilter(
|
|
199
199
|
rawConfig.content?.pipeline?.include || rawConfig.include || defaultPipelineInclude,
|
|
200
200
|
rawConfig.content?.pipeline?.exclude || rawConfig.exclude || defaultPipelineExclude,
|
|
201
201
|
{ resolve: typeof configOrPath === "string" ? configOrPath : root }
|
|
@@ -407,7 +407,7 @@ function unplugin(configOrPath, defaults) {
|
|
|
407
407
|
code = code.replace(HASH_PLACEHOLDER_RE, "");
|
|
408
408
|
code = code.replace(LAYER_PLACEHOLDER_RE, (_, layer, escapeView) => {
|
|
409
409
|
replaced = true;
|
|
410
|
-
const css = layer.trim() === LAYER_MARK_ALL ? result.getLayers(
|
|
410
|
+
const css = layer.trim() === LAYER_MARK_ALL ? result.getLayers(void 0, Array.from(entries).map((i) => resolveLayer(i)).filter((i) => !!i)) : result.getLayer(layer) || "";
|
|
411
411
|
escapeCss = escapeCss ?? getCssEscaperForJsContent(escapeView.trim());
|
|
412
412
|
return escapeCss(css);
|
|
413
413
|
});
|
|
@@ -436,7 +436,7 @@ function unplugin(configOrPath, defaults) {
|
|
|
436
436
|
const layer = resolveLayer(path);
|
|
437
437
|
if (!layer)
|
|
438
438
|
return;
|
|
439
|
-
const code = layer === LAYER_MARK_ALL ? result.getLayers(
|
|
439
|
+
const code = layer === LAYER_MARK_ALL ? result.getLayers(void 0, Array.from(entries).map((i) => resolveLayer(i)).filter((i) => !!i)) : result.getLayer(layer) || "";
|
|
440
440
|
const hash = getHash(code);
|
|
441
441
|
hashes.set(path, hash);
|
|
442
442
|
plugin.__vfs.writeModule(id, code);
|
|
@@ -5,8 +5,8 @@ import { glob } from 'tinyglobby';
|
|
|
5
5
|
import remapping from '@ampproject/remapping';
|
|
6
6
|
import MagicString from 'magic-string';
|
|
7
7
|
import { cssIdRE, createGenerator, BetterMap } from '@unocss/core';
|
|
8
|
-
import { createFilter } from '@rollup/pluginutils';
|
|
9
8
|
import { createRecoveryConfigLoader } from '@unocss/config';
|
|
9
|
+
import { createFilter } from 'unplugin-utils';
|
|
10
10
|
import { createHash } from 'node:crypto';
|
|
11
11
|
import { createUnplugin } from 'unplugin';
|
|
12
12
|
import WebpackSources from 'webpack-sources';
|
|
@@ -397,7 +397,7 @@ function unplugin(configOrPath, defaults) {
|
|
|
397
397
|
code = code.replace(HASH_PLACEHOLDER_RE, "");
|
|
398
398
|
code = code.replace(LAYER_PLACEHOLDER_RE, (_, layer, escapeView) => {
|
|
399
399
|
replaced = true;
|
|
400
|
-
const css = layer.trim() === LAYER_MARK_ALL ? result.getLayers(
|
|
400
|
+
const css = layer.trim() === LAYER_MARK_ALL ? result.getLayers(void 0, Array.from(entries).map((i) => resolveLayer(i)).filter((i) => !!i)) : result.getLayer(layer) || "";
|
|
401
401
|
escapeCss = escapeCss ?? getCssEscaperForJsContent(escapeView.trim());
|
|
402
402
|
return escapeCss(css);
|
|
403
403
|
});
|
|
@@ -426,7 +426,7 @@ function unplugin(configOrPath, defaults) {
|
|
|
426
426
|
const layer = resolveLayer(path);
|
|
427
427
|
if (!layer)
|
|
428
428
|
return;
|
|
429
|
-
const code = layer === LAYER_MARK_ALL ? result.getLayers(
|
|
429
|
+
const code = layer === LAYER_MARK_ALL ? result.getLayers(void 0, Array.from(entries).map((i) => resolveLayer(i)).filter((i) => !!i)) : result.getLayer(layer) || "";
|
|
430
430
|
const hash = getHash(code);
|
|
431
431
|
hashes.set(path, hash);
|
|
432
432
|
plugin.__vfs.writeModule(id, code);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/webpack",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "66.0.0",
|
|
5
5
|
"description": "The Webpack plugin for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"homepage": "https://unocss.dev",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/unocss/unocss",
|
|
12
|
+
"url": "git+https://github.com/unocss/unocss",
|
|
13
13
|
"directory": "packages-integrations/webpack"
|
|
14
14
|
},
|
|
15
15
|
"bugs": {
|
|
@@ -61,19 +61,19 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@ampproject/remapping": "^2.3.0",
|
|
64
|
-
"@rollup/pluginutils": "^5.1.4",
|
|
65
64
|
"chokidar": "^3.6.0",
|
|
66
65
|
"magic-string": "^0.30.17",
|
|
67
66
|
"tinyglobby": "^0.2.10",
|
|
68
|
-
"unplugin": "^2.
|
|
67
|
+
"unplugin": "^2.2.0",
|
|
68
|
+
"unplugin-utils": "^0.2.4",
|
|
69
69
|
"webpack-sources": "^3.2.3",
|
|
70
|
-
"@unocss/
|
|
71
|
-
"@unocss/
|
|
70
|
+
"@unocss/core": "66.0.0",
|
|
71
|
+
"@unocss/config": "66.0.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/webpack": "^5.28.5",
|
|
75
75
|
"@types/webpack-sources": "^3.2.3",
|
|
76
|
-
"webpack": "^5.
|
|
76
|
+
"webpack": "^5.98.0"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "unbuild",
|