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.
Expected Behavior
The console should contain the following:
Actual Behavior
The console contains the following:
This means that the entry point is returning
isEntry: falseeven though it should returnisEntry: trueAdditional Information
I noticed this bug while using the Rust Rollup plugin. With that plugin, you can import
Cargo.tomlfiles:The Rust plugin requires
isEntryin order to generate correct code.However, even though those
Cargo.tomlfiles are not CommonJS (they're not even JS!) the commonjs plugin breaks them by causingisEntryto returnfalseeven though it should returntrue.