aboutsummaryrefslogtreecommitdiffstats
path: root/webpack.common.js
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2021-12-01 22:29:37 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-01-08 10:11:58 +0100
commit8ee7c20e4d634f85a9b481b4a829cc65e277bc69 (patch)
tree850a33589f0b6b5fd51c56c57c33325fd631ef81 /webpack.common.js
parent5a51a6b3e59f8efd382f0aad31a268a090f017f9 (diff)
downloadnextcloud-server-8ee7c20e4d634f85a9b481b4a829cc65e277bc69.tar.gz
nextcloud-server-8ee7c20e4d634f85a9b481b4a829cc65e277bc69.zip
Use rootModule when module is concatenated
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'webpack.common.js')
-rw-r--r--webpack.common.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/webpack.common.js b/webpack.common.js
index 74fbef1aa9e..cb9b0d0a806 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -27,7 +27,10 @@ module.exports = {
publicPath: '/dist/',
filename: (chunkData) => {
// Get relative path of the src folder
- const srcPath = chunkData.chunk.entryModule.context
+ let srcPath = chunkData.chunk.entryModule.context
+ if (srcPath === null) {
+ srcPath = chunkData.chunk.entryModule.rootModule.context
+ }
const relativePath = path.relative(__dirname, srcPath)
// If this is a core source, output in core dist folder