add build context name to Rspack configuration and processes

This commit is contained in:
Nacho Codoñer
2025-07-18 15:08:10 +02:00
parent 022e3a6059
commit c88c042591
2 changed files with 11 additions and 2 deletions

View File

@@ -187,7 +187,7 @@ export default function (inMeteor = {}, argv = {}) {
// Base client config
let clientConfig = {
name: 'meteor-client',
name: Meteor.name,
target: 'web',
mode,
entry: path.resolve(process.cwd(), buildContext, entryPath),
@@ -273,7 +273,7 @@ export default function (inMeteor = {}, argv = {}) {
// Base server config
let serverConfig = {
name: 'meteor-server',
name: Meteor.name,
target: 'node',
mode,
entry: path.resolve(process.cwd(), buildContext, entryPath),

View File

@@ -2,6 +2,7 @@
* @module processes
* @description Functions for managing RSPack processes
*/
import { RSPACK_BUILD_CONTEXT } from "./constants";
const {
spawnProcess,
@@ -82,6 +83,14 @@ export function getRSPackEnv({ isClient, isServer }) {
const isJsxEnabled = inputFilePath.endsWith('.jsx');
const pairs = [
['name',
`${RSPACK_BUILD_CONTEXT}/${getBuildFilePath({
...env,
...side,
isMain: true,
role: FILE_ROLE.output,
})}`,
],
['isDevelopment', isMeteorAppDevelopment()],
['isProduction', isMeteorAppProduction()],
['isDebug', isMeteorAppDebug()],