@meteorjs/rspack 0.1.3 → 0.1.5
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 +25 -15
package/package.json
CHANGED
package/rspack.config.js
CHANGED
|
@@ -226,6 +226,9 @@ module.exports = async function (inMeteor = {}, argv = {}) {
|
|
|
226
226
|
const projectDir = process.cwd();
|
|
227
227
|
const projectConfigPath = Meteor.projectConfigPath || path.resolve(projectDir, 'rspack.config.js');
|
|
228
228
|
const configPath = Meteor.configPath;
|
|
229
|
+
const testEntry = Meteor.testEntry;
|
|
230
|
+
const testClientEntry = Meteor.testClientEntry;
|
|
231
|
+
const testServerEntry = Meteor.testServerEntry;
|
|
229
232
|
|
|
230
233
|
const isTypescriptEnabled = Meteor.isTypescriptEnabled || false;
|
|
231
234
|
const isJsxEnabled =
|
|
@@ -409,26 +412,29 @@ module.exports = async function (inMeteor = {}, argv = {}) {
|
|
|
409
412
|
]
|
|
410
413
|
: [];
|
|
411
414
|
|
|
412
|
-
|
|
413
415
|
const clientEntry =
|
|
414
416
|
isTest && isTestEager && isTestFullApp
|
|
415
417
|
? generateEagerTestFile({
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
418
|
+
isAppTest: true,
|
|
419
|
+
projectDir,
|
|
420
|
+
buildContext,
|
|
421
|
+
ignoreEntries: [...meteorIgnoreEntries, "**/server/**"],
|
|
422
|
+
prefix: "client",
|
|
423
|
+
})
|
|
422
424
|
: isTest && isTestEager
|
|
423
|
-
|
|
425
|
+
? generateEagerTestFile({
|
|
424
426
|
isAppTest: false,
|
|
425
427
|
isClient: true,
|
|
426
428
|
projectDir,
|
|
427
429
|
buildContext,
|
|
428
|
-
ignoreEntries: [...meteorIgnoreEntries,
|
|
429
|
-
prefix:
|
|
430
|
+
ignoreEntries: [...meteorIgnoreEntries, "**/server/**"],
|
|
431
|
+
prefix: "client",
|
|
430
432
|
})
|
|
431
|
-
|
|
433
|
+
: isTest && testEntry
|
|
434
|
+
? path.resolve(process.cwd(), testEntry)
|
|
435
|
+
: isTest && testClientEntry
|
|
436
|
+
? path.resolve(process.cwd(), testClientEntry)
|
|
437
|
+
: path.resolve(process.cwd(), buildContext, entryPath);
|
|
432
438
|
const clientNameConfig = `[${(isTest && 'test-') || ''}client-rspack]`;
|
|
433
439
|
// Base client config
|
|
434
440
|
let clientConfig = {
|
|
@@ -530,17 +536,21 @@ module.exports = async function (inMeteor = {}, argv = {}) {
|
|
|
530
536
|
isAppTest: true,
|
|
531
537
|
projectDir,
|
|
532
538
|
buildContext,
|
|
533
|
-
ignoreEntries: [...meteorIgnoreEntries,
|
|
534
|
-
prefix:
|
|
539
|
+
ignoreEntries: [...meteorIgnoreEntries, "**/client/**"],
|
|
540
|
+
prefix: "server",
|
|
535
541
|
})
|
|
536
542
|
: isTest && isTestEager
|
|
537
543
|
? generateEagerTestFile({
|
|
538
544
|
isAppTest: false,
|
|
539
545
|
projectDir,
|
|
540
546
|
buildContext,
|
|
541
|
-
ignoreEntries: [...meteorIgnoreEntries,
|
|
542
|
-
prefix:
|
|
547
|
+
ignoreEntries: [...meteorIgnoreEntries, "**/client/**"],
|
|
548
|
+
prefix: "server",
|
|
543
549
|
})
|
|
550
|
+
: isTest && testEntry
|
|
551
|
+
? path.resolve(process.cwd(), testEntry)
|
|
552
|
+
: isTest && testServerEntry
|
|
553
|
+
? path.resolve(process.cwd(), testServerEntry)
|
|
544
554
|
: path.resolve(projectDir, buildContext, entryPath);
|
|
545
555
|
const serverNameConfig = `[${(isTest && 'test-') || ''}server-rspack]`;
|
|
546
556
|
// Base server config
|