@oroinc/oro-webpack-config-builder 5.1.0-lts007 → 5.1.0-lts008
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/oro-webpack-config.js +22 -2
- package/package.json +2 -1
- package/style/admin-style-loader.js +1 -1
package/oro-webpack-config.js
CHANGED
|
@@ -27,6 +27,8 @@ const validation = require('./validation');
|
|
|
27
27
|
const EventEmitter = require('events');
|
|
28
28
|
const ErrorHandler = require('./error-handler');
|
|
29
29
|
|
|
30
|
+
const {ModifySourcePlugin, ConcatOperation} = require('modify-source-webpack-plugin');
|
|
31
|
+
|
|
30
32
|
require('resolve-url-loader');
|
|
31
33
|
|
|
32
34
|
class ConfigBuilder {
|
|
@@ -371,7 +373,20 @@ class ConfigBuilder {
|
|
|
371
373
|
}),
|
|
372
374
|
new AfterWebpackLogsPlugin(
|
|
373
375
|
stats => this.emitter.emit('build:complete', stats)
|
|
374
|
-
)
|
|
376
|
+
),
|
|
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
|
+
}),
|
|
375
390
|
]
|
|
376
391
|
};
|
|
377
392
|
|
|
@@ -470,13 +485,18 @@ class ConfigBuilder {
|
|
|
470
485
|
);
|
|
471
486
|
jsBuildConfig = this._layoutThemeConfigFactory.create(buildPublicPath, jsModulesConfig);
|
|
472
487
|
}
|
|
473
|
-
|
|
488
|
+
let {rtl_support: rtlSupport = false, resolve_extra_paths: resolveExtraPaths = []} = themeDefinition;
|
|
474
489
|
const resolvedBuildPath = path.join(this.resolvedPublicPath, buildPublicPath);
|
|
475
490
|
|
|
491
|
+
if (resolveExtraPaths.length) {
|
|
492
|
+
resolveExtraPaths = resolveExtraPaths.map(extraPath => path.join(this.resolvedPublicPath, extraPath));
|
|
493
|
+
}
|
|
494
|
+
|
|
476
495
|
const resolverConfig = {
|
|
477
496
|
modules: [
|
|
478
497
|
resolvedBuildPath,
|
|
479
498
|
this.resolvedPublicPath,
|
|
499
|
+
...resolveExtraPaths,
|
|
480
500
|
path.join(this.resolvedProjectPath, '/assets'),
|
|
481
501
|
path.join(this.resolvedPublicPath, '/bundles'),
|
|
482
502
|
path.join(this.resolvedPublicPath, '/js'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oroinc/oro-webpack-config-builder",
|
|
3
|
-
"version": "5.1.0-
|
|
3
|
+
"version": "5.1.0-lts008",
|
|
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.",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"js-yaml": "~4.1.0",
|
|
24
24
|
"mini-css-extract-plugin": "~2.7.1",
|
|
25
25
|
"minimist": "~1.2.7",
|
|
26
|
+
"modify-source-webpack-plugin": "^4.1.0",
|
|
26
27
|
"nan": "~2.17.0",
|
|
27
28
|
"path": "0.12.7",
|
|
28
29
|
"postcss": "~8.4.23",
|
|
@@ -11,7 +11,7 @@ class AdminStyleLoader extends StyleLoader {
|
|
|
11
11
|
const baseThemeConfig = this._configLoader.loadConfig(themeName, 'Resources/config/oro/assets.yml');
|
|
12
12
|
const appRootExtraConfig = this._configLoader.loadConfig(themeName, 'config/oro/assets.yml');
|
|
13
13
|
/** @type {Object.<string, ThemeGroupConfig>} */
|
|
14
|
-
const themeConfig = merge(baseThemeConfig, appRootExtraConfig, extraThemeConfig);
|
|
14
|
+
const themeConfig = merge.all([baseThemeConfig, appRootExtraConfig, extraThemeConfig]);
|
|
15
15
|
|
|
16
16
|
return {
|
|
17
17
|
themeConfig,
|