EntryPlugin

Adds an entry chunk on compilation. The chunk is named options.name and contains only one module (plus dependencies). The module is resolved from entry in context (absolute path).

new rspack.EntryPlugin(context, entry, options);

Options

context

The module is resolved from entry in context (absolute path).

  • Type: string

entry

The request path for the entry module.

  • Type: string

options

To adjust settings related to the entry module.

  • Type:
type EntryOptions =
  | string
  | (Omit<EntryDescriptionNormalized, 'import'> & {
      /**
       * The name of the entry chunk.
       */
      name?: string;
    });

If options is a string, its value will be used as name.

Please refer to Entry Description Object for all available options.