Skip to content

[Feature]: Configuration base for modern.server-runtime.ts #7073

Closed
@jonmean

Description

@jonmean

What problem does this feature solve?

Hello, is it possible to have a base configuration for the server file like we have for modern.config?

I would like to have basic configurations to allow override on the client, but I couldn't find any examples.

modern.config.ts

import {
  type AppTools,
  type UserConfig,
  appTools,
  mergeConfig,
} from '@modern-js/app-tools';

export const applyBaseConfig = (
  config: UserConfig<AppTools<'rspack'>> = {},
) => {
  return mergeConfig([
    {
     ...
    },
    config,
  ]);
};

modern.server-runtime.config.ts
...

What does the proposed API look like?

modern.server-runtime.config.ts

*** make server types available ***

import {
  mergeConfig,
} from '@modern-js/app-tools';

export const applyServerBaseConfig = (
  config: ServerConfig<> = {},
) => {
  return mergeConfig([
    {
     ...
    },
    config,
  ]);
};

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions