On this page

Define Global Settings

Declares the global configuration of your project. The configuration file src/global.config.ts is managed in the following format:

import { GlobalConfig } from '@ray-js/types';

// Global configuration of IoT WeChat miniApp
export const wechat = {
  // Global configuration of IoT WeChat miniApp
};

// Global configuration of Smart Miniapp
export const tuya = {};

// Global configuration of Web H5 page
export const web = {};

// Generic configuration
const globalConfig: GlobalConfig = {
  basename: '',
};

export default globalConfig;

To support multiple platforms, you can export the global configuration by making the following declaration export const <$target> = {}. By default, the generic configuration is exported.

Generic configuration

basename

Type: string

The base path of a route.