Skip to content

Commit 8e213c5

Browse files
authored
Add source-map-loader for easier debugging (element-hq#28580)
of matrix-widget-api and other libs Signed-off-by: Michael Telatynski <[email protected]>
1 parent c34cbd0 commit 8e213c5

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@
273273
"raw-loader": "^4.0.2",
274274
"rimraf": "^6.0.0",
275275
"semver": "^7.5.2",
276+
"source-map-loader": "^5.0.0",
276277
"stylelint": "^16.1.0",
277278
"stylelint-config-standard": "^36.0.0",
278279
"stylelint-scss": "^6.0.0",

webpack.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ module.exports = (env, argv) => {
238238
},
239239
},
240240

241+
// Some of our deps have broken source maps, so we have to ignore warnings or exclude them one-by-one
242+
ignoreWarnings: [/Failed to parse source map/],
243+
241244
module: {
242245
noParse: [
243246
// for cross platform compatibility use [\\\/] as the path separator
@@ -250,6 +253,11 @@ module.exports = (env, argv) => {
250253
/highlight\.js[\\/]lib[\\/]languages/,
251254
],
252255
rules: [
256+
{
257+
test: /\.js$/,
258+
enforce: "pre",
259+
use: ["source-map-loader"],
260+
},
253261
{
254262
test: /\.(ts|js)x?$/,
255263
include: (f) => {

yarn.lock

+10-2
Original file line numberDiff line numberDiff line change
@@ -6858,7 +6858,7 @@ [email protected]:
68586858
dependencies:
68596859
safer-buffer ">= 2.1.2 < 3"
68606860

6861-
[email protected], iconv-lite@^0.6:
6861+
[email protected], iconv-lite@^0.6, iconv-lite@^0.6.3:
68626862
version "0.6.3"
68636863
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
68646864
integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==
@@ -10787,11 +10787,19 @@ sockjs@^0.3.24:
1078710787
uuid "^8.3.2"
1078810788
websocket-driver "^0.7.4"
1078910789

10790-
source-map-js@^1.0.1, source-map-js@^1.2.0, source-map-js@^1.2.1:
10790+
source-map-js@^1.0.1, source-map-js@^1.0.2, source-map-js@^1.2.0, source-map-js@^1.2.1:
1079110791
version "1.2.1"
1079210792
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46"
1079310793
integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==
1079410794

10795+
source-map-loader@^5.0.0:
10796+
version "5.0.0"
10797+
resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-5.0.0.tgz#f593a916e1cc54471cfc8851b905c8a845fc7e38"
10798+
integrity sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA==
10799+
dependencies:
10800+
iconv-lite "^0.6.3"
10801+
source-map-js "^1.0.2"
10802+
1079510803
1079610804
version "0.5.13"
1079710805
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"

0 commit comments

Comments
 (0)