Skip to content

node-resolve plugin doesn't respect sideEffects #1159

@pd4d10

Description

@pd4d10
  • Rollup Plugin Name: @rollup/plugin-node-resolve
  • Rollup Plugin Version: 13.1.3
  • Rollup Version: 2.70.1
  • Operating System (or Browser): macOS
  • Node Version: 16
  • Link to reproduction (⚠️ read below): https://stackblitz.com/edit/node-lr98tg

Expected Behavior

As lib/common.js are listed in the sideEffects field, these lines should not be removed:

https://github.com/wooorm/lowlight/blob/0803fc3416cbdf59f204da243313e3315eb34617/lib/common.js#L1-L36

Actual Behavior

They are removed incorrectly

Additional Information

Reproduce steps

  1. Open the reproduction link above
  2. run npm run build
  3. Check if the JS output has these highlight.js languages code bundled in

Related: vitejs/vite#7635

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions