@meteorjs/rspack 0.0.25 → 0.0.26
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/entries/eager-app-tests.js +3 -1
- package/package.json +1 -1
- package/rspack.config.js +14 -13
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
+
console.log("--> (eager-app-tests.js-Line: 8)\n entro: ");
|
|
2
3
|
const ctx = import.meta.webpackContext('/', {
|
|
3
4
|
recursive: true,
|
|
4
|
-
regExp: /\.app
|
|
5
|
+
regExp: /\.app-(?:test|spec)s?\.[^.]+$/,
|
|
5
6
|
exclude: /(^|\/)(node_modules|\.meteor|_build)(\/|$)/,
|
|
6
7
|
mode: 'eager',
|
|
7
8
|
});
|
|
9
|
+
console.log("--> (eager-app-tests.js-Line: 8)\n ctx: ", ctx);
|
|
8
10
|
ctx.keys().forEach(ctx);
|
|
9
11
|
}
|
package/package.json
CHANGED
package/rspack.config.js
CHANGED
|
@@ -120,16 +120,16 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
const isProd = Meteor.isProduction || argv.mode === 'production';
|
|
124
|
-
const isDev = Meteor.isDevelopment || !isProd;
|
|
125
|
-
const isTest = Meteor.isTest;
|
|
126
|
-
const isClient = Meteor.isClient;
|
|
127
|
-
const isRun = Meteor.isRun;
|
|
128
|
-
const isReactEnabled = Meteor.isReactEnabled;
|
|
129
|
-
const isTestModule = Meteor.isTestModule;
|
|
130
|
-
const isTestEager = Meteor.isTestEager;
|
|
131
|
-
const isTestFullApp = Meteor.isTestFullApp;
|
|
132
|
-
const swcExternalHelpers = Meteor.swcExternalHelpers;
|
|
123
|
+
const isProd = !!Meteor.isProduction || argv.mode === 'production';
|
|
124
|
+
const isDev = !!Meteor.isDevelopment || !isProd;
|
|
125
|
+
const isTest = !!Meteor.isTest;
|
|
126
|
+
const isClient = !!Meteor.isClient;
|
|
127
|
+
const isRun = !!Meteor.isRun;
|
|
128
|
+
const isReactEnabled = !!Meteor.isReactEnabled;
|
|
129
|
+
const isTestModule = !!Meteor.isTestModule;
|
|
130
|
+
const isTestEager = !!Meteor.isTestEager;
|
|
131
|
+
const isTestFullApp = !!Meteor.isTestFullApp;
|
|
132
|
+
const swcExternalHelpers = !!Meteor.swcExternalHelpers;
|
|
133
133
|
const mode = isProd ? 'production' : 'development';
|
|
134
134
|
|
|
135
135
|
const isTypescriptEnabled = Meteor.isTypescriptEnabled || false;
|
|
@@ -351,9 +351,9 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
351
351
|
|
|
352
352
|
const serverEntry =
|
|
353
353
|
isTest && isTestEager && isTestFullApp
|
|
354
|
-
? 'node_modules/@meteorjs/rspack/entries/eager-app-tests.js'
|
|
354
|
+
? path.resolve(process.cwd(), 'node_modules/@meteorjs/rspack/entries/eager-app-tests.js')
|
|
355
355
|
: isTest && isTestEager
|
|
356
|
-
? 'node_modules/@meteorjs/rspack/entries/eager-tests.js'
|
|
356
|
+
? path.resolve(process.cwd(), 'node_modules/@meteorjs/rspack/entries/eager-tests.js')
|
|
357
357
|
: path.resolve(process.cwd(), buildContext, entryPath);
|
|
358
358
|
const serverNameConfig = `[${(isTest && 'test-') || ''}${
|
|
359
359
|
(isTestModule && 'module') || 'server'
|
|
@@ -368,8 +368,9 @@ export default function (inMeteor = {}, argv = {}) {
|
|
|
368
368
|
path: serverOutputDir,
|
|
369
369
|
filename: () => `../${buildContext}/${outputPath}`,
|
|
370
370
|
libraryTarget: 'commonjs',
|
|
371
|
-
chunkFilename: `${bundlesContext}/[id].[chunkhash].js`,
|
|
371
|
+
chunkFilename: `${bundlesContext}/[id]${isProd ? '.[chunkhash]' : ''}.js`,
|
|
372
372
|
assetModuleFilename: `${assetsContext}/[hash][ext][query]`,
|
|
373
|
+
clean: isProd,
|
|
373
374
|
},
|
|
374
375
|
optimization: { usedExports: true },
|
|
375
376
|
module: {
|