@oroinc/oro-webpack-config-builder 5.1.0-lts009 → 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,8 +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
-
30
- const {ModifySourcePlugin, ConcatOperation} = require('modify-source-webpack-plugin');
29
+ const TerserPlugin = require('terser-webpack-plugin');
31
30
 
32
31
  require('resolve-url-loader');
33
32
 
@@ -291,7 +290,20 @@ class ConfigBuilder {
291
290
  cacheGroups: {
292
291
  defaultVendors: false
293
292
  }
294
- }
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
+ })]
295
307
  },
296
308
  resolveLoader: {
297
309
  modules: [
@@ -374,19 +386,6 @@ class ConfigBuilder {
374
386
  new AfterWebpackLogsPlugin(
375
387
  stats => this.emitter.emit('build:complete', stats)
376
388
  ),
377
- new ModifySourcePlugin({
378
- rules: [
379
- {
380
- test: /\.js$/,
381
- operations: [
382
- new ConcatOperation(
383
- 'end',
384
- '\n;console.log("$FILE_PATH".replace("node_modules", "\x1B[92;4mnode_modules\x1B[m").replace("orothemedefault51", "\x1B[94;4morothemedefault51\x1B[m"));\n'
385
- )
386
- ]
387
- }
388
- ]
389
- }),
390
389
  ]
391
390
  };
392
391
 
@@ -433,7 +432,10 @@ class ConfigBuilder {
433
432
  // Additional setting for production mode
434
433
  if (this._isProduction) {
435
434
  webpackConfig.devtool = false;
436
- webpackConfig.plugins.push(new CssMinimizerPlugin());
435
+ webpackConfig.plugins.push(new CssMinimizerPlugin({
436
+ parallel: true,
437
+ minify: CssMinimizerPlugin.esbuildMinify
438
+ }));
437
439
  }
438
440
 
439
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-lts009",
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,13 +18,13 @@
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",
23
25
  "js-yaml": "~4.1.0",
24
26
  "mini-css-extract-plugin": "~2.7.1",
25
27
  "minimist": "~1.2.7",
26
- "modify-source-webpack-plugin": "^4.1.0",
27
28
  "nan": "~2.17.0",
28
29
  "path": "0.12.7",
29
30
  "postcss": "~8.4.23",
@@ -36,6 +37,7 @@
36
37
  "schema-utils": "^4.0.0",
37
38
  "style-loader": "~3.3.1",
38
39
  "terser": "~5.17.1",
40
+ "terser-webpack-plugin": "^5.3.13",
39
41
  "text-loader": "0.0.1",
40
42
  "underscore": "1.13.*",
41
43
  "url-loader": "~4.1.1",