summaryrefslogtreecommitdiffstatshomepage
path: root/tools
diff options
context:
space:
mode:
authorGreg Ziółkowski <gziolo@git.wordpress.org>2022-09-23 08:25:45 +0000
committerGreg Ziółkowski <gziolo@git.wordpress.org>2022-09-23 08:25:45 +0000
commit108c92d8dd17b928b79a3304a8e03de0bf0b6069 (patch)
treeb7875a12906025fc8d3fb1119f6221037821de0d /tools
parentac8cccac67a8f61e74824716507851e237826f4d (diff)
downloadwordpress-108c92d8dd17b928b79a3304a8e03de0bf0b6069.tar.gz
wordpress-108c92d8dd17b928b79a3304a8e03de0bf0b6069.zip
Build: Improve how combined assets are generated
Allows to revert changes applied in [54277] - temporary workaround for the failing Test NPM CI check on Windows. Improvements included: - generate combined asset files for both production and development - store in the repository only the production version of the combined assets for packages, we use everything else only in development - to make unit tests work, ensure that they ignore react fast refresh and use the production version of combined assets that are present in the source code Props bernhard-reiter, jsnajdr, clorith, wildworks. Fixes #56615. git-svn-id: https://develop.svn.wordpress.org/trunk@54289 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'tools')
-rw-r--r--tools/webpack/development.js4
-rw-r--r--tools/webpack/packages.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/webpack/development.js b/tools/webpack/development.js
index 1b871ee665..4c283ab5cf 100644
--- a/tools/webpack/development.js
+++ b/tools/webpack/development.js
@@ -35,7 +35,7 @@ module.exports = function( env = { environment: 'production', buildTarget: false
'@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js',
},
plugins: [ new DependencyExtractionWebpackPlugin( {
- outputFilename: '../../../assets/script-loader-[name].php',
+ outputFilename: `../../../assets/script-loader-[name]${ suffix }.php`,
} ) ],
},
{
@@ -53,7 +53,7 @@ module.exports = function( env = { environment: 'production', buildTarget: false
plugins: [
new DependencyExtractionWebpackPlugin( {
useDefaults: false,
- outputFilename: '../../../assets/script-loader-[name].php'
+ outputFilename: `../../../assets/script-loader-[name]${ suffix }.php`
} ),
],
},
diff --git a/tools/webpack/packages.js b/tools/webpack/packages.js
index 100853e668..f782081be5 100644
--- a/tools/webpack/packages.js
+++ b/tools/webpack/packages.js
@@ -158,7 +158,7 @@ module.exports = function( env = { environment: 'production', watch: false, buil
new DependencyExtractionPlugin( {
injectPolyfill: true,
combineAssets: true,
- combinedOutputFile: '../../assets/script-loader-packages.php',
+ combinedOutputFile: `../../assets/script-loader-packages${ suffix }.php`,
} ),
new CopyWebpackPlugin( {
patterns: [