Introduce
Modern.js runtime configuration should be centralized in the src/modern.runtime.ts file.
Info
If this file doesn't exist in your project yet, create it with the following command:
Basic Configuration
Multi-Entry Configuration
For multi-entry applications, defineRuntimeConfig can accept a function that returns specific configurations based on the entry name:
Tip
Using the src/modern.runtime.ts configuration approach does not support exporting asynchronous functions, which is related to the rendering method of Modern.js. If you need to add asynchronous logic, please use the Runtime Plugin.