lib.umdName

  • Type: string | string[] | { amd?: string, commonjs?: string, root?: string | string[] }
  • Default: undefined

The export name of the UMD bundle.

TIP

The module name of the UMD bundle must not conflict with the global variable name.

Example

  • Mount the UMD bundle to global.MyLibrary.
rslib.config.ts
export default {
  lib: [
    {
      format: 'umd',
      umdName: 'MyLibrary',
    },
  ],
};
  • Mount the UMD bundle to global.MyLibrary.Utils.
rslib.config.ts
export default {
  lib: [
    {
      format: 'umd',
      umdName: ['MyLibrary', 'Utils'],
    },
  ],
};