From 21e305f2966bdfe6b4235eca68a4c0b0f1add703 Mon Sep 17 00:00:00 2001 From: Fellan-91 Date: Mon, 23 Oct 2023 12:48:52 +0300 Subject: [PATCH] fixed builder for Windows OS --- webpack.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index a5da47b3..d77f79eb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -287,11 +287,14 @@ const newConfig = { let cssOutput = `${path.dirname( chunkName )}/${cacheGroupKey}-${path.basename(chunkName)}`; + const foundingChunk = chunkName + .split(path.win32.sep) + .join(path.posix.sep); if ( - (chunkName.indexOf('templates/') > -1 || - chunkName.indexOf('admin/css/') > -1 || - chunkName.indexOf('gutenberg/') > -1) && + (foundingChunk.indexOf('templates/') > -1 || + foundingChunk.indexOf('admin/css/') > -1 || + foundingChunk.indexOf('gutenberg/') > -1) && cacheGroupKey === 'style' ) { cssOutput = `${path.dirname(