From 8ee7c20e4d634f85a9b481b4a829cc65e277bc69 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Wed, 1 Dec 2021 22:29:37 +0100 Subject: Use rootModule when module is concatenated Signed-off-by: Louis Chemineau --- webpack.common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3