From ae2b8ba6004c413231c1c4ff4f980fb5870348f3 Mon Sep 17 00:00:00 2001 From: Nikan Radan <41648290+SmushyTaco@users.noreply.github.com> Date: Wed, 1 Jan 2025 22:34:52 -0800 Subject: [PATCH] Fix RTLCSS Support This solves #68364 to allow for the proper use of control directives. --- packages/scripts/config/webpack.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/scripts/config/webpack.config.js b/packages/scripts/config/webpack.config.js index c7be796c12c028..60bc78e1b407ec 100644 --- a/packages/scripts/config/webpack.config.js +++ b/packages/scripts/config/webpack.config.js @@ -83,8 +83,11 @@ const cssLoaders = [ 'default', { discardComments: { - removeAll: true, + remove(comment) { + return !/(\!rtl)/.test(comment); + }, }, + cssDeclarationSorter: false }, ], } ),