summaryrefslogtreecommitdiffstats
path: root/webpack.common.js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2021-12-02 22:39:00 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-01-08 10:14:52 +0100
commitfc536de25cb93292639c6258bd631f9aaf685565 (patch)
treeb8f171bc9d4b01858ab70080adf873850eb425e8 /webpack.common.js
parent87d0904b6f6209a553efd5d405c917012a91e259 (diff)
downloadnextcloud-server-fc536de25cb93292639c6258bd631f9aaf685565.tar.gz
nextcloud-server-fc536de25cb93292639c6258bd631f9aaf685565.zip
Ensure mapfile consistency
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'webpack.common.js')
-rw-r--r--webpack.common.js8
1 files changed, 8 insertions, 0 deletions
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: {