Skip to content

Commit d66427d

Browse files
committed
Relative-ize paths in webpack config: they're supposed to be relative but sometimes they aren't.
1 parent f618585 commit d66427d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ module.exports = {
2020
// removed which gives a tree with matrix-react-sdk and vector
2121
// trees smashed together, but this fixes everything being under
2222
// various levels of '.' and '..'
23-
return info.resourcePath.replace(/^[\/\.]*/, '');
23+
// Also, sometimes the resource path is absolute.
24+
return path.relative(process.cwd(), info.resourcePath).replace(/^[\/\.]*/, '');
2425
}
2526
},
2627
resolve: {

0 commit comments

Comments
 (0)