Skip to content

Commit 33b1249

Browse files
committed
RTLCSS Source Maps
1 parent 6f67f14 commit 33b1249

File tree

3 files changed

+66
-17
lines changed

3 files changed

+66
-17
lines changed

package-lock.json

Lines changed: 59 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/scripts/config/webpack.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,12 @@ const scriptConfig = {
397397
filename: '[name].css',
398398
} ),
399399
// RtlCssPlugin to generate RTL CSS files.
400-
new RtlCssPlugin( '[name]-rtl.css' ),
400+
new RtlCssPlugin( {
401+
fileNameMap: {
402+
'.css': '[name]-rtl.css',
403+
},
404+
sourceMap: ! isProduction,
405+
} ),
401406
// React Fast Refresh.
402407
hasReactFastRefresh && new ReactRefreshWebpackPlugin(),
403408
// WP_NO_EXTERNALS global variable controls whether scripts' assets get

packages/scripts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"react-refresh": "^0.14.0",
8282
"read-pkg-up": "^7.0.1",
8383
"resolve-bin": "^0.4.0",
84-
"rtlcss-webpack-plugin": "npm:@smushytaco/rtlcss-webpack-plugin@^1.0.9",
84+
"rtlcss-webpack-plugin": "npm:@smushytaco/rtlcss-webpack-plugin@^2.0.0",
8585
"sass": "^1.54.0",
8686
"sass-loader": "^16.0.3",
8787
"schema-utils": "^4.2.0",

0 commit comments

Comments
 (0)