@meteorjs/rspack 0.0.30 → 0.0.31

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 +4 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meteorjs/rspack",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
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
@@ -82,21 +82,6 @@ function createSwcConfig({
82
82
  };
83
83
  }
84
84
 
85
- // Coffeescript rule
86
- function createCoffeescriptConfig({ swcConfig }) {
87
- return {
88
- test: /\.coffee$/i,
89
- use: [
90
- {
91
- loader: 'swc-loader',
92
- options: swcConfig,
93
- },
94
- {
95
- loader: 'coffee-loader',
96
- },
97
- ],
98
- };
99
- }
100
85
 
101
86
  // Keep files outside of build folders
102
87
  function keepOutsideBuild() {
@@ -148,7 +133,6 @@ export default function (inMeteor = {}, argv = {}) {
148
133
  const isTsxEnabled =
149
134
  Meteor.isTsxEnabled || (isTypescriptEnabled && isReactEnabled) || false;
150
135
 
151
- const isCoffeescriptEnabled = Meteor.isCoffeescriptEnabled || false;
152
136
 
153
137
  // Determine entry points
154
138
  const entryPath = Meteor.entryPath;
@@ -227,6 +211,9 @@ export default function (inMeteor = {}, argv = {}) {
227
211
  externalHelpers: swcExternalHelpers,
228
212
  isDevEnvironment,
229
213
  });
214
+ // Expose swc config to use in custom configs
215
+ Meteor.swcConfigOptions = swcConfigRule.options;
216
+
230
217
  const externals = [
231
218
  /^meteor.*/,
232
219
  ...(isReactEnabled ? [/^react$/, /^react-dom$/] : []),
@@ -235,7 +222,6 @@ export default function (inMeteor = {}, argv = {}) {
235
222
  '/': path.resolve(process.cwd()),
236
223
  };
237
224
  const extensions = [
238
- ...(isCoffeescriptEnabled ? ['.coffee'] : []),
239
225
  '.ts',
240
226
  '.tsx',
241
227
  '.mts',
@@ -247,11 +233,7 @@ export default function (inMeteor = {}, argv = {}) {
247
233
  '.json',
248
234
  '.wasm',
249
235
  ];
250
- const extraRules = [
251
- ...(isCoffeescriptEnabled
252
- ? [createCoffeescriptConfig({ swcConfig: swcConfigRule?.options })]
253
- : []),
254
- ];
236
+ const extraRules = [];
255
237
 
256
238
  const reactRefreshModule = isReactEnabled
257
239
  ? safeRequire('@rspack/plugin-react-refresh')