@unocss/webpack 0.57.6 → 0.58.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 +8 -3
- package/dist/index.mjs +8 -3
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -58,7 +58,11 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
58
58
|
let rawConfig = {};
|
|
59
59
|
let configFileList = [];
|
|
60
60
|
const uno = core.createGenerator(rawConfig, defaults);
|
|
61
|
-
let rollupFilter = pluginutils.createFilter(
|
|
61
|
+
let rollupFilter = pluginutils.createFilter(
|
|
62
|
+
defaultPipelineInclude,
|
|
63
|
+
defaultPipelineExclude,
|
|
64
|
+
{ resolve: typeof configOrPath === "string" ? configOrPath : root }
|
|
65
|
+
);
|
|
62
66
|
const invalidations = [];
|
|
63
67
|
const reloadListeners = [];
|
|
64
68
|
const modules = new core.BetterMap();
|
|
@@ -76,7 +80,8 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
76
80
|
uno.config.envMode = "dev";
|
|
77
81
|
rollupFilter = rawConfig.content?.pipeline === false ? () => false : pluginutils.createFilter(
|
|
78
82
|
rawConfig.content?.pipeline?.include || rawConfig.include || defaultPipelineInclude,
|
|
79
|
-
rawConfig.content?.pipeline?.exclude || rawConfig.exclude || defaultPipelineExclude
|
|
83
|
+
rawConfig.content?.pipeline?.exclude || rawConfig.exclude || defaultPipelineExclude,
|
|
84
|
+
{ resolve: typeof configOrPath === "string" ? configOrPath : root }
|
|
80
85
|
);
|
|
81
86
|
tokens.clear();
|
|
82
87
|
await Promise.all(modules.map((code, id) => uno.applyExtractors(code.replace(SKIP_COMMENT_RE, ""), id, tokens)));
|
|
@@ -334,7 +339,7 @@ function WebpackPlugin(configOrPath, defaults) {
|
|
|
334
339
|
name: "unocss:webpack",
|
|
335
340
|
enforce: "pre",
|
|
336
341
|
transformInclude(id) {
|
|
337
|
-
return filter("", id) && !id.
|
|
342
|
+
return filter("", id) && !id.endsWith(".html") && !RESOLVED_ID_RE.test(id);
|
|
338
343
|
},
|
|
339
344
|
async transform(code, id) {
|
|
340
345
|
const result = await applyTransformers(ctx, code, id, "pre");
|
package/dist/index.mjs
CHANGED
|
@@ -45,7 +45,11 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
45
45
|
let rawConfig = {};
|
|
46
46
|
let configFileList = [];
|
|
47
47
|
const uno = createGenerator(rawConfig, defaults);
|
|
48
|
-
let rollupFilter = createFilter(
|
|
48
|
+
let rollupFilter = createFilter(
|
|
49
|
+
defaultPipelineInclude,
|
|
50
|
+
defaultPipelineExclude,
|
|
51
|
+
{ resolve: typeof configOrPath === "string" ? configOrPath : root }
|
|
52
|
+
);
|
|
49
53
|
const invalidations = [];
|
|
50
54
|
const reloadListeners = [];
|
|
51
55
|
const modules = new BetterMap();
|
|
@@ -63,7 +67,8 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
63
67
|
uno.config.envMode = "dev";
|
|
64
68
|
rollupFilter = rawConfig.content?.pipeline === false ? () => false : createFilter(
|
|
65
69
|
rawConfig.content?.pipeline?.include || rawConfig.include || defaultPipelineInclude,
|
|
66
|
-
rawConfig.content?.pipeline?.exclude || rawConfig.exclude || defaultPipelineExclude
|
|
70
|
+
rawConfig.content?.pipeline?.exclude || rawConfig.exclude || defaultPipelineExclude,
|
|
71
|
+
{ resolve: typeof configOrPath === "string" ? configOrPath : root }
|
|
67
72
|
);
|
|
68
73
|
tokens.clear();
|
|
69
74
|
await Promise.all(modules.map((code, id) => uno.applyExtractors(code.replace(SKIP_COMMENT_RE, ""), id, tokens)));
|
|
@@ -321,7 +326,7 @@ function WebpackPlugin(configOrPath, defaults) {
|
|
|
321
326
|
name: "unocss:webpack",
|
|
322
327
|
enforce: "pre",
|
|
323
328
|
transformInclude(id) {
|
|
324
|
-
return filter("", id) && !id.
|
|
329
|
+
return filter("", id) && !id.endsWith(".html") && !RESOLVED_ID_RE.test(id);
|
|
325
330
|
},
|
|
326
331
|
async transform(code, id) {
|
|
327
332
|
const result = await applyTransformers(ctx, code, id, "pre");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/webpack",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"description": "The Webpack plugin for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@ampproject/remapping": "^2.2.1",
|
|
40
|
-
"@rollup/pluginutils": "^5.0
|
|
40
|
+
"@rollup/pluginutils": "^5.1.0",
|
|
41
41
|
"chokidar": "^3.5.3",
|
|
42
42
|
"fast-glob": "^3.3.2",
|
|
43
43
|
"magic-string": "^0.30.5",
|
|
44
44
|
"unplugin": "^1.5.1",
|
|
45
45
|
"webpack-sources": "^3.2.3",
|
|
46
|
-
"@unocss/config": "0.
|
|
47
|
-
"@unocss/core": "0.
|
|
46
|
+
"@unocss/config": "0.58.0",
|
|
47
|
+
"@unocss/core": "0.58.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/webpack": "^5.28.5",
|