@enact/cli 7.0.0-alpha.1 → 7.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 7.0.0-alpha.2 (December 6, 2024)
2
+
3
+ * Updated dependencies.
4
+
1
5
  ## 7.0.0-alpha.1 (July 24, 2024)
2
6
 
3
7
  * Updated the minimum version of Node to `18.12.0`.
package/commands/pack.js CHANGED
@@ -59,6 +59,7 @@ function displayHelp() {
59
59
  Private Options:
60
60
  --entry Specify an override entrypoint
61
61
  --no-minify Will skip minification during production build
62
+ --no-split-css Will not split CSS into separate files
62
63
  --framework Builds the @enact/*, react, and react-dom into an external framework
63
64
  --externals Specify a local directory path to the standalone external framework
64
65
  --externals-public Remote public path to the external framework for use injecting into HTML
@@ -258,12 +259,13 @@ function api(opts = {}) {
258
259
  opts['content-hash'],
259
260
  opts.isomorphic,
260
261
  !opts.animation,
262
+ !opts['split-css'],
261
263
  opts.framework,
262
264
  opts['ilib-additional-path']
263
265
  );
264
266
 
265
267
  // Set any entry path override
266
- if (opts.entry) helper.replaceMain(config, path.resolve(opts.entry));
268
+ if (opts.entry || app.entry) helper.replaceEntry(config, opts.entry || app.entry);
267
269
 
268
270
  // Set any output path override
269
271
  if (opts.output) config.output.path = path.resolve(opts.output);
@@ -289,6 +291,7 @@ function cli(args) {
289
291
  'content-hash',
290
292
  'custom-skin',
291
293
  'minify',
294
+ 'split-css',
292
295
  'framework',
293
296
  'externals-corejs',
294
297
  'stats',
@@ -301,7 +304,7 @@ function cli(args) {
301
304
  'help'
302
305
  ],
303
306
  string: ['externals', 'externals-public', 'locales', 'entry', 'ilib-additional-path', 'output', 'meta'],
304
- default: {minify: true, animation: true},
307
+ default: {minify: true, 'split-css': true, animation: true},
305
308
  alias: {
306
309
  o: 'output',
307
310
  p: 'production',
@@ -45,6 +45,7 @@ module.exports = function (
45
45
  contentHash = false,
46
46
  isomorphic = false,
47
47
  noAnimation = false,
48
+ noSplitCSS = false,
48
49
  framework = false,
49
50
  ilibAdditionalResourcesPath
50
51
  ) {
@@ -462,7 +463,17 @@ module.exports = function (
462
463
  parallel: true
463
464
  }),
464
465
  new CssMinimizerPlugin()
465
- ]
466
+ ],
467
+ splitChunks: noSplitCSS && {
468
+ cacheGroups: {
469
+ styles: {
470
+ name: 'main',
471
+ type: 'css/mini-extract',
472
+ chunks: 'all',
473
+ enforce: true
474
+ }
475
+ }
476
+ }
466
477
  },
467
478
  plugins: [
468
479
  // Generates an `index.html` file with the js and css tags injected.
@@ -506,7 +517,8 @@ module.exports = function (
506
517
  !process.env.INLINE_STYLES &&
507
518
  new MiniCssExtractPlugin({
508
519
  filename: contentHash ? '[name].[contenthash].css' : '[name].css',
509
- chunkFilename: contentHash ? 'chunk.[name].[contenthash].css' : 'chunk.[name].css'
520
+ chunkFilename: contentHash ? 'chunk.[name].[contenthash].css' : 'chunk.[name].css',
521
+ ignoreOrder: noSplitCSS
510
522
  }),
511
523
  // Webpack5 removed node polyfills but we need this to run screenshot tests
512
524
  new NodePolyfillPlugin(),