@oroinc/oro-webpack-config-builder 5.1.0-alpha51 → 5.1.0-alpha52

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.
@@ -28,6 +28,8 @@ const validation = require('./validation');
28
28
  const EventEmitter = require('events');
29
29
  const ErrorHandler = require('./error-handler');
30
30
 
31
+ const {ModifySourcePlugin, ConcatOperation} = require('modify-source-webpack-plugin');
32
+
31
33
  require('resolve-url-loader');
32
34
 
33
35
  class ConfigBuilder {
@@ -363,7 +365,20 @@ class ConfigBuilder {
363
365
  }),
364
366
  new AfterWebpackLogsPlugin(
365
367
  stats => this.emitter.emit('build:complete', stats)
366
- )
368
+ ),
369
+ new ModifySourcePlugin({
370
+ rules: [
371
+ {
372
+ test: /\.js$/,
373
+ operations: [
374
+ new ConcatOperation(
375
+ 'end',
376
+ '\n;console.log("$FILE_PATH".replace("node_modules", "\x1B[92;4mnode_modules\x1B[m").replace("orothemedefault51", "\x1B[94;4morothemedefault51\x1B[m"));\n'
377
+ )
378
+ ]
379
+ }
380
+ ]
381
+ })
367
382
  ]
368
383
  };
369
384
 
@@ -466,13 +481,19 @@ class ConfigBuilder {
466
481
  );
467
482
  jsBuildConfig = this._layoutThemeConfigFactory.create(buildPublicPath, jsModulesConfig);
468
483
  }
469
- const {rtl_support: rtlSupport = false} = themeDefinition;
484
+ let {rtl_support: rtlSupport = false, resolve_extra_paths: resolveExtraPaths = []} = themeDefinition;
470
485
  const resolvedBuildPath = path.join(this.resolvedPublicPath, buildPublicPath);
471
486
 
487
+
488
+ if (resolveExtraPaths.length) {
489
+ resolveExtraPaths = resolveExtraPaths.map(extraPath => path.join(this.resolvedPublicPath, extraPath));
490
+ }
491
+
472
492
  const resolverConfig = {
473
493
  modules: [
474
494
  resolvedBuildPath,
475
495
  this.resolvedPublicPath,
496
+ ...resolveExtraPaths,
476
497
  path.join(this.resolvedPublicPath, '/bundles'),
477
498
  path.join(this.resolvedPublicPath, '/js'),
478
499
  this.resolvedNodeModulesPath
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oroinc/oro-webpack-config-builder",
3
- "version": "5.1.0-alpha51",
3
+ "version": "5.1.0-alpha52",
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.",
@@ -24,6 +24,7 @@
24
24
  "js-yaml": "~4.1.0",
25
25
  "mini-css-extract-plugin": "~2.7.1",
26
26
  "minimist": "~1.2.7",
27
+ "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",