@weapp-tailwindcss/postcss 1.0.10-alpha.2 → 1.0.10
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 +10 -4
- package/dist/index.mjs +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21,7 +21,11 @@ function getDefaultOptions() {
|
|
|
21
21
|
add: false
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
cssRemoveProperty: true
|
|
24
|
+
cssRemoveProperty: true,
|
|
25
|
+
cssSelectorReplacement: {
|
|
26
|
+
root: "page",
|
|
27
|
+
universal: ["view", "text"]
|
|
28
|
+
}
|
|
25
29
|
};
|
|
26
30
|
}
|
|
27
31
|
|
|
@@ -670,9 +674,6 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
670
674
|
if (opts.isMainChunk) {
|
|
671
675
|
let layerProperties;
|
|
672
676
|
p.Once = (root) => {
|
|
673
|
-
root.walkRules((rule) => {
|
|
674
|
-
commonChunkPreflight(rule, opts);
|
|
675
|
-
});
|
|
676
677
|
root.walkAtRules((atRule) => {
|
|
677
678
|
if (atRule.name === "layer" && atRule.params === "properties") {
|
|
678
679
|
if (atRule.nodes === void 0 || _optionalChain([atRule, 'access', _28 => _28.nodes, 'optionalAccess', _29 => _29.length]) === 0) {
|
|
@@ -681,6 +682,8 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
681
682
|
if (layerProperties) {
|
|
682
683
|
layerProperties.replaceWith(atRule.first.nodes);
|
|
683
684
|
atRule.remove();
|
|
685
|
+
} else {
|
|
686
|
+
atRule.replaceWith(atRule.first.nodes);
|
|
684
687
|
}
|
|
685
688
|
}
|
|
686
689
|
} else if (isTailwindcssV4ModernCheck(atRule)) {
|
|
@@ -689,6 +692,9 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
689
692
|
}
|
|
690
693
|
}
|
|
691
694
|
});
|
|
695
|
+
root.walkRules((rule) => {
|
|
696
|
+
commonChunkPreflight(rule, opts);
|
|
697
|
+
});
|
|
692
698
|
};
|
|
693
699
|
}
|
|
694
700
|
return p;
|
package/dist/index.mjs
CHANGED
|
@@ -21,7 +21,11 @@ function getDefaultOptions() {
|
|
|
21
21
|
add: false
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
cssRemoveProperty: true
|
|
24
|
+
cssRemoveProperty: true,
|
|
25
|
+
cssSelectorReplacement: {
|
|
26
|
+
root: "page",
|
|
27
|
+
universal: ["view", "text"]
|
|
28
|
+
}
|
|
25
29
|
};
|
|
26
30
|
}
|
|
27
31
|
|
|
@@ -670,9 +674,6 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
670
674
|
if (opts.isMainChunk) {
|
|
671
675
|
let layerProperties;
|
|
672
676
|
p.Once = (root) => {
|
|
673
|
-
root.walkRules((rule) => {
|
|
674
|
-
commonChunkPreflight(rule, opts);
|
|
675
|
-
});
|
|
676
677
|
root.walkAtRules((atRule) => {
|
|
677
678
|
if (atRule.name === "layer" && atRule.params === "properties") {
|
|
678
679
|
if (atRule.nodes === void 0 || atRule.nodes?.length === 0) {
|
|
@@ -681,6 +682,8 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
681
682
|
if (layerProperties) {
|
|
682
683
|
layerProperties.replaceWith(atRule.first.nodes);
|
|
683
684
|
atRule.remove();
|
|
685
|
+
} else {
|
|
686
|
+
atRule.replaceWith(atRule.first.nodes);
|
|
684
687
|
}
|
|
685
688
|
}
|
|
686
689
|
} else if (isTailwindcssV4ModernCheck(atRule)) {
|
|
@@ -689,6 +692,9 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
689
692
|
}
|
|
690
693
|
}
|
|
691
694
|
});
|
|
695
|
+
root.walkRules((rule) => {
|
|
696
|
+
commonChunkPreflight(rule, opts);
|
|
697
|
+
});
|
|
692
698
|
};
|
|
693
699
|
}
|
|
694
700
|
return p;
|