Add source-map-loader for easier debugging (#28580)

of matrix-widget-api and other libs

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-11-27 14:16:05 +00:00 committed by GitHub
parent c34cbd011d
commit 8e213c5d34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 2 deletions

View file

@ -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
@ -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) => {