Skip to content

Commit 935a59d

Browse files
authored
Merge pull request #99 from nextcloud/fix/fix-sourcemap-namespace
2 parents 2f69869 + b4e18a3 commit 935a59d

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nextcloud/webpack-vue-config",
3-
"version": "4.0.2",
3+
"version": "4.0.3-alpha.2",
44
"description": "A webpack vue config for nextcloud apps",
55
"author": "John Molakvoæ <skjnldsv@protonmail.com>",
66
"license": "AGPL-3.0-or-later",

webpack.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ module.exports = {
4949
publicPath: '/js/',
5050
filename: `${appName}-[name].js?v=[contenthash]`,
5151
chunkFilename: `${appName}-[name].js?v=[contenthash]`,
52+
// Make sure sourcemaps have a proper path and do not
53+
// leak local paths https://github.com/webpack/webpack/issues/3603
54+
devtoolNamespace: appName,
55+
devtoolModuleFilenameTemplate(info) {
56+
const rootDir = process.cwd()
57+
const rel = path.relative(rootDir, info.absoluteResourcePath)
58+
return `webpack:///${appName}/${rel}`
59+
},
5260
},
5361

5462
optimization: {

0 commit comments

Comments
 (0)