@meteorjs/rspack 0.3.54 → 0.3.56

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/package.json +1 -1
  2. package/rspack.config.js +20 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meteorjs/rspack",
3
- "version": "0.3.54",
3
+ "version": "0.3.56",
4
4
  "description": "Configuration logic for using Rspack in Meteor projects",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
package/rspack.config.js CHANGED
@@ -427,6 +427,8 @@ module.exports = async function (inMeteor = {}, argv = {}) {
427
427
  }),
428
428
  ]
429
429
  : [];
430
+ // Not supported in Meteor yet (Rspack 1.7+ is enabled by default)
431
+ const lazyCompilationConfig = { lazyCompilation: false };
430
432
 
431
433
  const clientEntry =
432
434
  isTest && isTestEager && isTestFullApp
@@ -545,7 +547,8 @@ module.exports = async function (inMeteor = {}, argv = {}) {
545
547
  },
546
548
  },
547
549
  }),
548
- ...merge(cacheStrategy, { experiments: { css: true } })
550
+ ...merge(cacheStrategy, { experiments: { css: true } }),
551
+ ...lazyCompilationConfig,
549
552
  };
550
553
 
551
554
  const serverEntry =
@@ -633,6 +636,7 @@ module.exports = async function (inMeteor = {}, argv = {}) {
633
636
  devtool: isDevEnvironment || isNative || isTest ? 'source-map' : 'hidden-source-map',
634
637
  ...((isDevEnvironment || (isTest && !isTestEager) || isNative) &&
635
638
  cacheStrategy),
639
+ ...lazyCompilationConfig,
636
640
  };
637
641
 
638
642
  // Helper function to load and process config files
@@ -705,10 +709,10 @@ module.exports = async function (inMeteor = {}, argv = {}) {
705
709
  }
706
710
 
707
711
  const nextUserConfig = await loadAndProcessConfig(
708
- projectConfigPathToUse,
709
- 'rspack.config.js',
710
- Meteor,
711
- argv,
712
+ projectConfigPathToUse,
713
+ 'rspack.config.js',
714
+ Meteor,
715
+ argv,
712
716
  isAngularEnabled
713
717
  );
714
718
 
@@ -772,8 +776,8 @@ module.exports = async function (inMeteor = {}, argv = {}) {
772
776
  const nextOverrideConfig = await loadAndProcessConfig(
773
777
  overrideConfigPath,
774
778
  configNameFull,
775
- Meteor,
776
- argv,
779
+ Meteor,
780
+ argv,
777
781
  isAngularEnabled
778
782
  );
779
783
 
@@ -794,5 +798,14 @@ module.exports = async function (inMeteor = {}, argv = {}) {
794
798
  console.log('Config:', inspect(config, { depth: null, colors: true }));
795
799
  }
796
800
 
801
+ // Check if lazyCompilation is enabled and warn the user
802
+ if (config.lazyCompilation === true || typeof config.lazyCompilation === 'object') {
803
+ console.warn(
804
+ '\n⚠️ Warning: lazyCompilation may not work correctly in the current Meteor-Rspack integration.\n' +
805
+ ' This feature will be evaluated for support in future Meteor versions.\n' +
806
+ ' If you encounter any issues, please disable it in your rspack config.\n',
807
+ );
808
+ }
809
+
797
810
  return [config];
798
811
  }