Skip to content

Commit

Permalink
fixed builder for Windows OS
Browse files Browse the repository at this point in the history
  • Loading branch information
Fellan-91 committed Oct 23, 2023
1 parent 3663e3c commit 21e305f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 21e305f

Please sign in to comment.