From fa4dca98fd39d1f15f17f3a9f3411b08b04431b0 Mon Sep 17 00:00:00 2001 From: Libor M Date: Sat, 30 Dec 2023 17:33:19 +0100 Subject: [PATCH] Fixed invalid source-maps in builded js file #2613 --- CHANGELOG.md | 1 + package.json | 1 + webpack.config.js | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ff436cad..ea85b2665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Minimal supported version Node.js 16 LTS - Fixed cover image size inside table - Fixed "Cannot read properties of undefined (reading 'bottomMost')" if table contains too few rows +- Fixed invalid source-maps in builded js file ## 0.3.0-beta.6 - 2023-11-09 diff --git a/package.json b/package.json index 80ecc9f70..2ecff3dfa 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "rewire": "^7.0.0", "shx": "^0.3.4", "sinon": "^17.0.1", + "source-map-loader": "^4.0.1", "stream-browserify": "^3.0.0", "string-replace-webpack-plugin": "^0.1.3", "svg-to-pdfkit": "^0.1.8", diff --git a/webpack.config.js b/webpack.config.js index 98cfb8522..45bd80657 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -77,6 +77,11 @@ module.exports = { }) } }, + { + enforce: "pre", + test: /\.(cjs|js)$/, + use: ["source-map-loader"], + }, { test: /\.js$/, include: /(pdfkit|linebreak|fontkit|saslprep|restructure|unicode-trie|unicode-properties|dfa|buffer|png-js|crypto-js)/,