From fc536de25cb93292639c6258bd631f9aaf685565 Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Thu, 2 Dec 2021 22:39:00 +0100 Subject: Ensure mapfile consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- webpack.common.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'webpack.common.js') diff --git a/webpack.common.js b/webpack.common.js index 1f9cecc2d2a..b101456bd5d 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -45,6 +45,14 @@ module.exports = { publicPath: '/dist/', filename: '[name].js?v=[contenthash]', chunkFilename: '[name]-[id].js?v=[contenthash]', + // Make sure sourcemaps have a proper path and do not + // leak local paths https://github.com/webpack/webpack/issues/3603 + devtoolNamespace: 'nextcloud', + devtoolModuleFilenameTemplate(info) { + const rootDir = process.cwd() + const rel = path.relative(rootDir, info.absoluteResourcePath) + return `webpack:///nextcloud/${rel}` + }, }, module: { -- cgit v1.2.3