diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-12-02 22:39:00 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-01-08 10:14:52 +0100 |
commit | fc536de25cb93292639c6258bd631f9aaf685565 (patch) | |
tree | b8f171bc9d4b01858ab70080adf873850eb425e8 /webpack.common.js | |
parent | 87d0904b6f6209a553efd5d405c917012a91e259 (diff) | |
download | nextcloud-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.js | 8 |
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: { |