pawajs 1.4.40 → 1.4.41

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.
Files changed (2) hide show
  1. package/index.js +5 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -325,7 +325,6 @@ export const createIntersectionObserver = (element, observeBy) => {
325
325
  return observer;
326
326
  }
327
327
  RegisterComponent.lazy=(...args)=>{
328
- if (typeof args[0] === 'string') {
329
328
  for (let i = 0; i < args.length; i += 2) {
330
329
  const name = args[i];
331
330
  const componentFunc = args[i + 1];
@@ -336,13 +335,10 @@ RegisterComponent.lazy=(...args)=>{
336
335
  }
337
336
 
338
337
  const processName =(compName) => {
339
- if (components.has(compName.toUpperCase())) return;
338
+ if (components.has(compName.toUpperCase()) || lazyComponents.has(compName.toUpperCase()) && !__pawaDev.tool) return;
339
+
340
340
  if (typeof compName === 'string') {
341
- if (isServer()) {
342
- componentFunc();
343
- }
344
- lazyComponents.set(compName.toUpperCase(), { name: compName, component: componentFunc });
345
-
341
+ lazyComponents.set(compName.toUpperCase(), { name: compName, component: componentFunc });
346
342
  }
347
343
  };
348
344
 
@@ -357,8 +353,8 @@ RegisterComponent.lazy=(...args)=>{
357
353
  break;
358
354
  }
359
355
  }
360
- return;
361
- }
356
+
357
+
362
358
  }
363
359
 
364
360
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pawajs",
3
- "version": "1.4.40",
3
+ "version": "1.4.41",
4
4
  "type":"module",
5
5
  "description": "pawajs library (reactive web runtime) for easily building web ui, enhancing html element, micro frontend etc ",
6
6
  "main": "index.js",