@oroinc/oro-webpack-config-builder 5.1.0-lts010 → 5.1.0-lts011

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.
@@ -26,6 +26,7 @@ const RtlCssWebpackPlugin = require('rtlcss-webpack-plugin');
26
26
  const validation = require('./validation');
27
27
  const EventEmitter = require('events');
28
28
  const ErrorHandler = require('./error-handler');
29
+ const TerserPlugin = require('terser-webpack-plugin');
29
30
 
30
31
  require('resolve-url-loader');
31
32
 
@@ -289,7 +290,20 @@ class ConfigBuilder {
289
290
  cacheGroups: {
290
291
  defaultVendors: false
291
292
  }
292
- }
293
+ },
294
+ minimize: this._isProduction,
295
+ minimizer: [new TerserPlugin({
296
+ parallel: true,
297
+ extractComments: false,
298
+ minify: TerserPlugin.swcMinify,
299
+ terserOptions: {
300
+ compress: true,
301
+ mangle: true,
302
+ format: {
303
+ comments: false
304
+ }
305
+ }
306
+ })]
293
307
  },
294
308
  resolveLoader: {
295
309
  modules: [
@@ -418,7 +432,10 @@ class ConfigBuilder {
418
432
  // Additional setting for production mode
419
433
  if (this._isProduction) {
420
434
  webpackConfig.devtool = false;
421
- webpackConfig.plugins.push(new CssMinimizerPlugin());
435
+ webpackConfig.plugins.push(new CssMinimizerPlugin({
436
+ parallel: true,
437
+ minify: CssMinimizerPlugin.esbuildMinify
438
+ }));
422
439
  }
423
440
 
424
441
  return webpackConfig;
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@oroinc/oro-webpack-config-builder",
3
- "version": "5.1.0-lts010",
3
+ "version": "5.1.0-lts011",
4
4
  "author": "Oro, Inc (https://www.oroinc.com)",
5
5
  "license": "MIT",
6
6
  "description": "An integration of OroPlatform based applications with the Webpack.",
7
7
  "main": "oro-webpack-config.js",
8
8
  "dependencies": {
9
+ "@swc/core": "^1.11.8",
9
10
  "@babel/core": "~7.21.3",
10
11
  "@babel/plugin-transform-runtime": "~7.21.0",
11
12
  "@babel/preset-env": "~7.21.2",
@@ -17,6 +18,7 @@
17
18
  "deepmerge": "~4.3.1",
18
19
  "exports-loader": "~4.0.0",
19
20
  "expose-loader": "~4.1.0",
21
+ "esbuild-loader": "^4.3.0",
20
22
  "file-loader": "~6.2.0",
21
23
  "html-webpack-plugin": "~5.5.0",
22
24
  "imports-loader": "~4.0.1",
@@ -35,6 +37,7 @@
35
37
  "schema-utils": "^4.0.0",
36
38
  "style-loader": "~3.3.1",
37
39
  "terser": "~5.17.1",
40
+ "terser-webpack-plugin": "^5.3.13",
38
41
  "text-loader": "0.0.1",
39
42
  "underscore": "1.13.*",
40
43
  "url-loader": "~4.1.1",