@meteorjs/rspack 0.0.41 → 0.0.43

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 +15 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meteorjs/rspack",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "description": "Configuration logic for using Rspack in Meteor projects",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/rspack.config.js CHANGED
@@ -71,8 +71,20 @@ function createSwcConfig({
71
71
  externalHelpers,
72
72
  },
73
73
  };
74
+
75
+ // Swcrc config not customizable
76
+ const omitPaths = [
77
+ 'jsc.target',
78
+ ];
79
+ // Define warning function
80
+ const warningFn = path => {
81
+ console.warn(
82
+ `[.swcrc] Ignored custom "${path}" — reserved for Meteor-Rspack integration.`,
83
+ );
84
+ };
74
85
  const customConfig = getMeteorAppSwcConfig() || {};
75
- const swcConfig = merge(defaultConfig, customConfig);
86
+ const cleanedCustomConfig = cleanOmittedPaths(customConfig, { omitPaths, warningFn });
87
+ const swcConfig = merge(defaultConfig, cleanedCustomConfig);
76
88
  return {
77
89
  test: /\.(?:[mc]?js|jsx|[mc]?ts|tsx)$/i,
78
90
  exclude: /node_modules|\.meteor\/local/,
@@ -261,8 +273,8 @@ export default function (inMeteor = {}, argv = {}) {
261
273
  ? [
262
274
  new rsdoctorModule.RsdoctorRspackPlugin({
263
275
  port: isClient
264
- ? (Meteor.rsdoctorClientPort || 8888)
265
- : (Meteor.rsdoctorServerPort || 8889),
276
+ ? (parseInt(Meteor.rsdoctorClientPort || '8888', 10))
277
+ : (parseInt(Meteor.rsdoctorServerPort || '8889', 10)),
266
278
  }),
267
279
  ]
268
280
  : [];