@unocss/webpack 0.12.11 → 0.12.15
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.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -81,11 +81,13 @@ function createContext(configOrPath, defaults = {}) {
|
|
|
81
81
|
function invalidate() {
|
|
82
82
|
invalidations.forEach((cb) => cb());
|
|
83
83
|
}
|
|
84
|
-
async function
|
|
84
|
+
async function extract(code, id) {
|
|
85
85
|
if (id)
|
|
86
86
|
modules.set(id, code);
|
|
87
|
+
const len = tokens.size;
|
|
87
88
|
await uno.applyExtractors(code, id, tokens);
|
|
88
|
-
|
|
89
|
+
if (tokens.size > len)
|
|
90
|
+
invalidate();
|
|
89
91
|
}
|
|
90
92
|
async function reloadConfig() {
|
|
91
93
|
if (!filepath)
|
|
@@ -110,7 +112,7 @@ function createContext(configOrPath, defaults = {}) {
|
|
|
110
112
|
filter,
|
|
111
113
|
reloadConfig,
|
|
112
114
|
uno,
|
|
113
|
-
extract
|
|
115
|
+
extract,
|
|
114
116
|
config,
|
|
115
117
|
configFilepath: filepath
|
|
116
118
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -53,11 +53,13 @@ function createContext(configOrPath, defaults = {}) {
|
|
|
53
53
|
function invalidate() {
|
|
54
54
|
invalidations.forEach((cb) => cb());
|
|
55
55
|
}
|
|
56
|
-
async function
|
|
56
|
+
async function extract(code, id) {
|
|
57
57
|
if (id)
|
|
58
58
|
modules.set(id, code);
|
|
59
|
+
const len = tokens.size;
|
|
59
60
|
await uno.applyExtractors(code, id, tokens);
|
|
60
|
-
|
|
61
|
+
if (tokens.size > len)
|
|
62
|
+
invalidate();
|
|
61
63
|
}
|
|
62
64
|
async function reloadConfig() {
|
|
63
65
|
if (!filepath)
|
|
@@ -82,7 +84,7 @@ function createContext(configOrPath, defaults = {}) {
|
|
|
82
84
|
filter,
|
|
83
85
|
reloadConfig,
|
|
84
86
|
uno,
|
|
85
|
-
extract
|
|
87
|
+
extract,
|
|
86
88
|
config,
|
|
87
89
|
configFilepath: filepath
|
|
88
90
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/webpack",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.15",
|
|
4
4
|
"description": "The Webpack plugin for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@rollup/pluginutils": "^4.1.1",
|
|
37
|
-
"@unocss/config": "0.12.
|
|
38
|
-
"@unocss/core": "0.12.
|
|
37
|
+
"@unocss/config": "0.12.15",
|
|
38
|
+
"@unocss/core": "0.12.15",
|
|
39
39
|
"unplugin": "^0.2.21",
|
|
40
40
|
"webpack-sources": "^3.2.2"
|
|
41
41
|
},
|