diff --git a/CHANGELOG.md b/CHANGELOG.md index 424f1484..76a12bf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.1.3 (October 17, 2024) + +* No significant changes. + ## 6.1.2 (March 13, 2024) * Updated docs to cover the latest commands of `enact pack`. diff --git a/commands/pack.js b/commands/pack.js index 398eb4f6..89fc5ab3 100755 --- a/commands/pack.js +++ b/commands/pack.js @@ -58,6 +58,7 @@ function displayHelp() { Private Options: --entry Specify an override entrypoint --no-minify Will skip minification during production build + --no-split-css Will not split CSS into separate files --framework Builds the @enact/*, react, and react-dom into an external framework --externals Specify a local directory path to the standalone external framework --externals-public Remote public path to the external framework for use injecting into HTML @@ -258,6 +259,7 @@ function api(opts = {}) { opts['content-hash'], opts.isomorphic, !opts.animation, + !opts['split-css'], opts.framework, opts['ilib-additional-path'] ); @@ -289,6 +291,7 @@ function cli(args) { 'content-hash', 'custom-skin', 'minify', + 'split-css', 'framework', 'externals-corejs', 'stats', @@ -301,7 +304,7 @@ function cli(args) { 'help' ], string: ['externals', 'externals-public', 'locales', 'entry', 'ilib-additional-path', 'output', 'meta'], - default: {minify: true, animation: true}, + default: {minify: true, 'split-css': true, animation: true}, alias: { o: 'output', p: 'production', diff --git a/config/webpack.config.js b/config/webpack.config.js index 18e45f32..7538e4e0 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -45,6 +45,7 @@ module.exports = function ( contentHash = false, isomorphic = false, noAnimation = false, + noSplitCSS = false, framework = false, ilibAdditionalResourcesPath ) { @@ -451,7 +452,17 @@ module.exports = function ( parallel: true }), new CssMinimizerPlugin() - ] + ], + splitChunks: noSplitCSS && { + cacheGroups: { + styles: { + name: 'main', + type: 'css/mini-extract', + chunks: 'all', + enforce: true + } + } + } }, plugins: [ // Generates an `index.html` file with the js and css tags injected. @@ -495,7 +506,8 @@ module.exports = function ( !process.env.INLINE_STYLES && new MiniCssExtractPlugin({ filename: contentHash ? '[name].[contenthash].css' : '[name].css', - chunkFilename: contentHash ? 'chunk.[name].[contenthash].css' : 'chunk.[name].css' + chunkFilename: contentHash ? 'chunk.[name].[contenthash].css' : 'chunk.[name].css', + ignoreOrder: noSplitCSS }), // Webpack5 removed node polyfills but we need this to run screenshot tests new NodePolyfillPlugin(), diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index a088838d..7e30bd16 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@enact/cli", - "version": "6.1.2", + "version": "6.1.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@enact/cli", - "version": "6.1.2", + "version": "6.1.3", "license": "Apache-2.0", "dependencies": { "@babel/plugin-transform-modules-commonjs": "^7.23.3", diff --git a/package.json b/package.json index 4061b24c..22da5597 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@enact/cli", - "version": "6.1.2", + "version": "6.1.3", "description": "Full-featured build environment tool for Enact applications.", "main": "index.js", "author": "Jason Robitaille ",