@meteorjs/rspack 0.0.8 → 0.0.10
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.
- package/package.json +1 -1
- package/rspack.config.js +6 -3
package/package.json
CHANGED
package/rspack.config.js
CHANGED
|
@@ -43,7 +43,7 @@ function createCacheStrategy(mode) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// SWC loader rule (JSX/JS)
|
|
46
|
-
function createSwcConfig({ isRun, isTypescriptEnabled, isJsxEnabled, isTsxEnabled }) {
|
|
46
|
+
function createSwcConfig({ isRun, isTypescriptEnabled, isJsxEnabled, isTsxEnabled, externalHelpers }) {
|
|
47
47
|
const defaultConfig = {
|
|
48
48
|
jsc: {
|
|
49
49
|
baseUrl: process.cwd(),
|
|
@@ -60,6 +60,7 @@ function createSwcConfig({ isRun, isTypescriptEnabled, isJsxEnabled, isTsxEnable
|
|
|
60
60
|
refresh: isRun,
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
|
+
externalHelpers,
|
|
63
64
|
},
|
|
64
65
|
};
|
|
65
66
|
const customConfig = getMeteorAppSwcConfig() || {};
|
|
@@ -117,6 +118,7 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
117
118
|
const isRun = Meteor.isRun;
|
|
118
119
|
const isReactEnabled = Meteor.isReactEnabled;
|
|
119
120
|
const isTestModule = Meteor.isTestModule;
|
|
121
|
+
const swcExternalHelpers = Meteor.swcExternalHelpers;
|
|
120
122
|
const mode = isProd ? 'production' : 'development';
|
|
121
123
|
|
|
122
124
|
const isTypescriptEnabled = Meteor.isTypescriptEnabled || false;
|
|
@@ -149,7 +151,7 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
149
151
|
const bundlesContext = Meteor.bundlesContext || 'bundles';
|
|
150
152
|
const assetsContext = Meteor.assetsContext || 'assets';
|
|
151
153
|
|
|
152
|
-
if (Meteor.isDebug) {
|
|
154
|
+
if (Meteor.isDebug || Meteor.isVerbose) {
|
|
153
155
|
console.log('[i] Rspack mode:', mode);
|
|
154
156
|
console.log('[i] Meteor flags:', Meteor);
|
|
155
157
|
}
|
|
@@ -159,6 +161,7 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
159
161
|
isTypescriptEnabled,
|
|
160
162
|
isJsxEnabled,
|
|
161
163
|
isTsxEnabled,
|
|
164
|
+
externalHelpers: swcExternalHelpers,
|
|
162
165
|
});
|
|
163
166
|
const externals = [
|
|
164
167
|
/^meteor.*/,
|
|
@@ -349,7 +352,7 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
349
352
|
|
|
350
353
|
const config = isClient ? clientConfig : serverConfig;
|
|
351
354
|
|
|
352
|
-
if (Meteor.isDebug) {
|
|
355
|
+
if (Meteor.isDebug || Meteor.isVerbose) {
|
|
353
356
|
console.log('Config:', inspect(config, { depth: null, colors: true }));
|
|
354
357
|
}
|
|
355
358
|
|