Skip to content

Commit

Permalink
Add source-map-loader for easier debugging (element-hq#28580)
Browse files Browse the repository at this point in the history
of matrix-widget-api and other libs

Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy authored Nov 27, 2024
1 parent c34cbd0 commit 8e213c5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@
"raw-loader": "^4.0.2",
"rimraf": "^6.0.0",
"semver": "^7.5.2",
"source-map-loader": "^5.0.0",
"stylelint": "^16.1.0",
"stylelint-config-standard": "^36.0.0",
"stylelint-scss": "^6.0.0",
Expand Down
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ module.exports = (env, argv) => {
},
},

// Some of our deps have broken source maps, so we have to ignore warnings or exclude them one-by-one
ignoreWarnings: [/Failed to parse source map/],

module: {
noParse: [
// for cross platform compatibility use [\\\/] as the path separator
Expand All @@ -250,6 +253,11 @@ module.exports = (env, argv) => {
/highlight\.js[\\/]lib[\\/]languages/,
],
rules: [
{
test: /\.js$/,
enforce: "pre",
use: ["source-map-loader"],
},
{
test: /\.(ts|js)x?$/,
include: (f) => {
Expand Down
12 changes: 10 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6858,7 +6858,7 @@ [email protected]:
dependencies:
safer-buffer ">= 2.1.2 < 3"

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

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

source-map-loader@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-5.0.0.tgz#f593a916e1cc54471cfc8851b905c8a845fc7e38"
integrity sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA==
dependencies:
iconv-lite "^0.6.3"
source-map-js "^1.0.2"

[email protected]:
version "0.5.13"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
Expand Down

0 comments on commit 8e213c5

Please sign in to comment.