diff options
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: { |