-
-
Notifications
You must be signed in to change notification settings - Fork 605
Closed
Description
- Rollup Plugin Name: @rollup/plugin-commonjs
- Rollup Plugin Version: 22.0.0
- Rollup Version: 2.70.2
- Operating System (or Browser): Linux 64-bit NixOS
- Node Version: v16.14.0
- Link to reproduction (
⚠️ read below): https://replit.com/@Pauan1/rollup-plugin-repro#rollup.config.js
Expected Behavior
The console should contain the following:
/home/runner/rollup-plugin-repro/input.js true
Actual Behavior
The console contains the following:
/home/runner/rollup-plugin-repro/input.js false
/home/runner/rollup-plugin-repro/input.js?commonjs-entry true
This means that the entry point is returning isEntry: false
even though it should return isEntry: true
Additional Information
I noticed this bug while using the Rust Rollup plugin. With that plugin, you can import Cargo.toml
files:
export default {
input: {
foo: "Cargo.toml",
}
};
The Rust plugin requires isEntry
in order to generate correct code.
However, even though those Cargo.toml
files are not CommonJS (they're not even JS!) the commonjs plugin breaks them by causing isEntry
to return false
even though it should return true
.
Metadata
Metadata
Assignees
Labels
No labels