Skip to content

Interface: SourceDescription

Defined in: plugin/index.ts:118

Extends

Properties

code

  • Type: string
Defined in: plugin/index.ts:120

invalidate?

  • Type: boolean | null
  • Optional
Defined in: plugin/index.ts:67

Inherited from

ModuleOptions.invalidate


map?

Defined in: plugin/index.ts:128

The source map for the transformation.

If the transformation does not move code, you can preserve existing sourcemaps by setting this to null.

See Source Code Transformations section for more details.


meta?

Defined in: plugin/index.ts:64

See Custom module meta-data section for more details.

Inherited from

ModuleOptions.meta


moduleSideEffects?

  • Type: ModuleSideEffects
  • Optional
Defined in: plugin/index.ts:94

Indicates whether the module has side effects to Rolldown.

  • If false is set and no other module imports anything from this module, then this module will not be included in the bundle even if the module would have side effects.
  • If true is set, Rolldown will use its default algorithm to include all statements in the module that has side effects.
  • If "no-treeshake" is set, treeshaking will be disabled for this module, and this module will be included in one of the chunks even if it is empty.

The precedence of this option is as follows (highest to lowest):

  1. transform hook's returned moduleSideEffects option
  2. load hook's returned moduleSideEffects option
  3. resolveId hook's returned moduleSideEffects option
  4. treeshake.moduleSideEffects option
  5. sideEffects field in the package.json file
  6. true (default)

Inherited from

SpecifiedModuleOptions.moduleSideEffects


moduleType?

Defined in: plugin/index.ts:129

packageJsonPath?

  • Type: string | null
  • Optional
Defined in: plugin/index.ts:68

Inherited from

ModuleOptions.packageJsonPath