Skip to content

Plugins cannot specify the entry option#1270

Description

@Pauan

Here is an example Rollup configuration:

export default {
  plugins: [
    {
      options: function (rollup) {
        rollup.entry = "foo.js";
      }
    }
  ]
};

When using rollup --config I get the following error:

馃毃   You must specify an --input (-i) option

If I instead use this config, then it works:

export default {
  entry: "foo.js",
  plugins: [
    {
      options: function (rollup) {
        rollup.entry = "foo.js";
      }
    }
  ]
};

Basically, it seems that Rollup is checking whether the entry option is specified or not, but it does this check before the plugins are run.

I think Rollup should do the check after the plugins run, because a plugin might set the entry in an options hook.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions