@unocss/webpack 0.59.0-beta.1 → 0.59.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.mjs +2 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -393,12 +393,13 @@ function WebpackPlugin(configOrPath, defaults) {
|
|
|
393
393
|
if (file === "*")
|
|
394
394
|
return;
|
|
395
395
|
let code = compilation.assets[file].source().toString();
|
|
396
|
+
let escapeCss;
|
|
396
397
|
let replaced = false;
|
|
397
398
|
code = code.replace(HASH_PLACEHOLDER_RE, "");
|
|
398
399
|
code = code.replace(LAYER_PLACEHOLDER_RE, (_, layer, escapeView) => {
|
|
399
400
|
replaced = true;
|
|
400
401
|
const css = layer === LAYER_MARK_ALL ? result.getLayers(void 0, Array.from(entries).map((i) => resolveLayer(i)).filter((i) => !!i)) : result.getLayer(layer) || "";
|
|
401
|
-
|
|
402
|
+
escapeCss = escapeCss ?? getCssEscaperForJsContent(escapeView);
|
|
402
403
|
return escapeCss(css);
|
|
403
404
|
});
|
|
404
405
|
if (replaced)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/webpack",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.59.0
|
|
4
|
+
"version": "0.59.0",
|
|
5
5
|
"description": "The Webpack plugin for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"@rollup/pluginutils": "^5.1.0",
|
|
41
41
|
"chokidar": "^3.6.0",
|
|
42
42
|
"fast-glob": "^3.3.2",
|
|
43
|
-
"magic-string": "^0.30.
|
|
43
|
+
"magic-string": "^0.30.9",
|
|
44
44
|
"unplugin": "^1.10.1",
|
|
45
45
|
"webpack-sources": "^3.2.3",
|
|
46
|
-
"@unocss/config": "0.59.0
|
|
47
|
-
"@unocss/core": "0.59.0
|
|
46
|
+
"@unocss/config": "0.59.0",
|
|
47
|
+
"@unocss/core": "0.59.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/webpack": "^5.28.5",
|