@rws-framework/client 2.23.2 → 2.23.3

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.
@@ -50,6 +50,14 @@ const RWSWebpackWrapper = async (appRoot, rwsFrontendConfig, _packageDir) => {
50
50
  loaderIgnoreExceptions,
51
51
  extraNodeModules
52
52
  } = await getBuildConfig(rwsFrontendConfig, _packageDir);
53
+
54
+ console.verboseLog = console.log;
55
+
56
+ console.log = (...x) => {
57
+ if(process.argv.find(a => a.includes('--verbose'))){
58
+ console.verboseLog(...x);
59
+ }
60
+ }
53
61
 
54
62
  timeLog({ devDebug });
55
63
 
@@ -84,12 +92,12 @@ const RWSWebpackWrapper = async (appRoot, rwsFrontendConfig, _packageDir) => {
84
92
 
85
93
  // #SECTION RWS COMPONENT SCAN && PARTED PROCESSING
86
94
  const RWSComponents = scanComponents(await partedComponentsEvents(partedComponentsLocations, rwsPlugins, isParted), executionDir, _packageDir);
87
- console.log(`${chalk.cyanBright('RWS Scanned')} ${chalk.yellowBright(RWSComponents.length)} components`);
95
+ console.verboseLog(`${chalk.cyanBright('RWS Scanned')} ${chalk.yellowBright(RWSComponents.length)} components`);
88
96
  const { automatedChunks, automatedEntries } = setComponentsChunks(rwsFrontendConfig.entrypoint, RWSComponents, isParted);
89
97
 
90
98
  // #SECTION RWS INFO FILE
91
99
  generateRWSInfoFile(outputDir, automatedEntries);
92
- console.log(chalk.greenBright(`RWSInfo file generated.`));
100
+ console.verboseLog(chalk.greenBright(`RWSInfo file generated.`));
93
101
 
94
102
 
95
103
  if (!isDev) {
@@ -144,17 +152,28 @@ const RWSWebpackWrapper = async (appRoot, rwsFrontendConfig, _packageDir) => {
144
152
  loaderIgnoreExceptions
145
153
  });
146
154
 
155
+ let optimization = {
156
+ // splitChunks: {
157
+ // chunks: 'all'
158
+ // }
159
+ }
147
160
 
148
161
  if (optimConfig) {
149
- // setup production config if it got created above
150
- cfgExport.optimization = optimConfig;
162
+ optimization = {...optimization, ...optimConfig}
151
163
  }
152
164
 
165
+ cfgExport.optimization = optimization;
166
+
167
+
153
168
  // #SECTION RWS PLUGINS onBuild EVENTS FIRE
154
169
  for (const pluginKey of Object.keys(rwsPlugins)) {
155
170
  const plugin = rwsPlugins[pluginKey];
156
171
  await plugin.onBuild(cfgExport);
157
- }
172
+ }
173
+
174
+ console.log('Aliases:', cfgExport.resolve.alias)
175
+
176
+ console.log('Optim:', optimization)
158
177
 
159
178
  return cfgExport;
160
179
  }
@@ -5,7 +5,7 @@ const util = require('util');
5
5
 
6
6
  module.exports = {
7
7
  start: (executionDir, tsConfig, outputDir, isDev, publicDir, isParted, partedPrefix, partedDirUrlPrefix, devTools, rwsPlugins) => {
8
- console.log(chalk.green('RWS Frontend build started with:'), {
8
+ console.verboseLog(chalk.green('RWS Frontend build started with:'), {
9
9
  executionDir,
10
10
  outputDir,
11
11
  dev: isDev,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rws-framework/client",
3
3
  "private": false,
4
- "version": "2.23.2",
4
+ "version": "2.23.3",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
7
7
  "docs": "typedoc --tsconfig ./tsconfig.json"
@@ -93,7 +93,7 @@ abstract class RWSViewComponent extends FoundationElement implements IRWSViewCom
93
93
 
94
94
  this.applyFileList();
95
95
 
96
- if (RWSViewComponent.FORCE_INJECT_STYLES) {
96
+ if (RWSViewComponent.FORCE_INJECT_STYLES && RWSViewComponent.FORCE_INJECT_STYLES.length > 0) {
97
97
  this.injectStyles(RWSViewComponent.FORCE_INJECT_STYLES, RWSViewComponent.FORCE_INJECT_MODE);
98
98
  }
99
99
 
@@ -50,7 +50,12 @@ export class CSSInjectionManager {
50
50
  throw new Error('Component must have a shadow root for CSS injection');
51
51
  }
52
52
 
53
- // Add initial transition styles to host element
53
+ // Only proceed if there are actually styles to inject
54
+ if (!styleLinks || styleLinks.length === 0) {
55
+ return;
56
+ }
57
+
58
+ // Add initial transition styles to host element only when injecting styles
54
59
  const transitionSheet = new CSSStyleSheet();
55
60
  await transitionSheet.replace(`
56
61
  :host {