From 2d98b9db3737a386cae1109aec60aed97682d0c4 Mon Sep 17 00:00:00 2001 From: Mikyung Kim Date: Mon, 14 Oct 2024 11:35:02 +0900 Subject: [PATCH 1/3] WRR-3401: Added a build option to support Suspense with snapshot build (#356) * WRR-3401: Added a build option to support Suspense with with snapshot build Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com) * Fixed spaces Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com) --- commands/pack.js | 5 ++++- config/webpack.config.js | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) 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(), From 2c467e059ea81adc786ee151270179a3536c134d Mon Sep 17 00:00:00 2001 From: "taeyoung.hong" Date: Thu, 17 Oct 2024 14:16:53 +0900 Subject: [PATCH 2/3] Update a change log for 6.1.3 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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`. From 930cc1591d97f075c621518850062113a3d6e96d Mon Sep 17 00:00:00 2001 From: Jenkins Date: Thu, 17 Oct 2024 14:23:07 +0900 Subject: [PATCH 3/3] Version value updating --- npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 ",