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):
transform hook's returned moduleSideEffects option
Indicates whether the module has side effects to Rolldown.
falseis 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.trueis set, Rolldown will use its default algorithm to include all statements in the module that has side effects."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):
transformhook's returnedmoduleSideEffectsoptionloadhook's returnedmoduleSideEffectsoptionresolveIdhook's returnedmoduleSideEffectsoptiontreeshake.moduleSideEffectsoptionsideEffectsfield in thepackage.jsonfiletrue(default)