@meteorjs/rspack 0.0.34 → 0.0.35
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 +14 -1
package/package.json
CHANGED
package/rspack.config.js
CHANGED
|
@@ -132,7 +132,7 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
132
132
|
Meteor.isJsxEnabled || (!isTypescriptEnabled && isReactEnabled) || false;
|
|
133
133
|
const isTsxEnabled =
|
|
134
134
|
Meteor.isTsxEnabled || (isTypescriptEnabled && isReactEnabled) || false;
|
|
135
|
-
|
|
135
|
+
const isBundleVisualizerEnabled = Meteor.isBundleVisualizerEnabled || false;
|
|
136
136
|
|
|
137
137
|
// Determine entry points
|
|
138
138
|
const entryPath = Meteor.entryPath;
|
|
@@ -251,6 +251,17 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
251
251
|
enableGlobalPolyfill: isDevEnvironment,
|
|
252
252
|
});
|
|
253
253
|
|
|
254
|
+
const rsdoctorModule = isBundleVisualizerEnabled
|
|
255
|
+
? safeRequire('@rsdoctor/rspack-plugin')
|
|
256
|
+
: null;
|
|
257
|
+
const doctorPluginConfig = isBundleVisualizerEnabled && rsdoctorModule?.RsdoctorRspackPlugin
|
|
258
|
+
? [
|
|
259
|
+
new rsdoctorModule.RsdoctorRspackPlugin({
|
|
260
|
+
port: isClient ? 8081 : 8082,
|
|
261
|
+
}),
|
|
262
|
+
]
|
|
263
|
+
: [];
|
|
264
|
+
|
|
254
265
|
const clientNameConfig = `[${(isTest && 'test-') || ''}${
|
|
255
266
|
(isTestModule && 'module') || 'client'
|
|
256
267
|
}-rspack]`;
|
|
@@ -316,6 +327,7 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
316
327
|
entryOnly: true,
|
|
317
328
|
}),
|
|
318
329
|
Meteor.HtmlRspackPlugin(),
|
|
330
|
+
...doctorPluginConfig,
|
|
319
331
|
],
|
|
320
332
|
watchOptions,
|
|
321
333
|
devtool: isDevEnvironment || isNative || isTest ? 'source-map' : 'hidden-source-map',
|
|
@@ -397,6 +409,7 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
397
409
|
entryOnly: true,
|
|
398
410
|
}),
|
|
399
411
|
isTestModule && requireExternalsPlugin,
|
|
412
|
+
...doctorPluginConfig,
|
|
400
413
|
],
|
|
401
414
|
watchOptions,
|
|
402
415
|
devtool: isDevEnvironment || isNative || isTest ? 'source-map' : 'hidden-source-map',
|