@weapp-tailwindcss/postcss 1.0.9 → 1.0.10-alpha.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.js +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -642,8 +642,9 @@ function commonChunkPreflight(node, options) {
|
|
|
642
642
|
function isAtMediaHover(atRule) {
|
|
643
643
|
return /media\(\s*hover\s*:\s*hover\s*\)/.test(atRule.name) || atRule.name === "media" && /\(\s*hover\s*:\s*hover\s*\)/.test(atRule.params);
|
|
644
644
|
}
|
|
645
|
-
|
|
646
|
-
|
|
645
|
+
var TAILWIND_V4_MODERN_REGEX = /^\(\(-webkit-hyphens:\s*none\)\s+and\s+\(not\s+\(margin-trim:\s*inline\)\)\)\s+or\s+\(\(-moz-orient:\s*inline\)\s+and\s+\(not\s+\(color:\s*rgb\(from\s+red\s+r\s+g\s+b\)\)\)\)$/;
|
|
646
|
+
function isTailwindcssV4ModernCheck(atRule) {
|
|
647
|
+
return atRule.name === "supports" && TAILWIND_V4_MODERN_REGEX.test(atRule.params);
|
|
647
648
|
}
|
|
648
649
|
var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
649
650
|
const opts = _shared.defu.call(void 0, options, { isMainChunk: true });
|
|
@@ -659,7 +660,7 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
659
660
|
} else {
|
|
660
661
|
atRule.remove();
|
|
661
662
|
}
|
|
662
|
-
} else if (
|
|
663
|
+
} else if (isTailwindcssV4ModernCheck(atRule)) {
|
|
663
664
|
if (_optionalChain([atRule, 'access', _28 => _28.first, 'optionalAccess', _29 => _29.type]) === "atrule" && atRule.first.name === "layer") {
|
|
664
665
|
atRule.replaceWith(atRule.first.nodes);
|
|
665
666
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -642,8 +642,9 @@ function commonChunkPreflight(node, options) {
|
|
|
642
642
|
function isAtMediaHover(atRule) {
|
|
643
643
|
return /media\(\s*hover\s*:\s*hover\s*\)/.test(atRule.name) || atRule.name === "media" && /\(\s*hover\s*:\s*hover\s*\)/.test(atRule.params);
|
|
644
644
|
}
|
|
645
|
-
|
|
646
|
-
|
|
645
|
+
var TAILWIND_V4_MODERN_REGEX = /^\(\(-webkit-hyphens:\s*none\)\s+and\s+\(not\s+\(margin-trim:\s*inline\)\)\)\s+or\s+\(\(-moz-orient:\s*inline\)\s+and\s+\(not\s+\(color:\s*rgb\(from\s+red\s+r\s+g\s+b\)\)\)\)$/;
|
|
646
|
+
function isTailwindcssV4ModernCheck(atRule) {
|
|
647
|
+
return atRule.name === "supports" && TAILWIND_V4_MODERN_REGEX.test(atRule.params);
|
|
647
648
|
}
|
|
648
649
|
var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
649
650
|
const opts = defu2(options, { isMainChunk: true });
|
|
@@ -659,7 +660,7 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
659
660
|
} else {
|
|
660
661
|
atRule.remove();
|
|
661
662
|
}
|
|
662
|
-
} else if (
|
|
663
|
+
} else if (isTailwindcssV4ModernCheck(atRule)) {
|
|
663
664
|
if (atRule.first?.type === "atrule" && atRule.first.name === "layer") {
|
|
664
665
|
atRule.replaceWith(atRule.first.nodes);
|
|
665
666
|
}
|