Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins cannot specify the entry option #1270

Closed
Pauan opened this issue Jan 16, 2017 · 2 comments 路 Fixed by #1434
Closed

Plugins cannot specify the entry option #1270

Pauan opened this issue Jan 16, 2017 · 2 comments 路 Fixed by #1434

Comments

@Pauan
Copy link
Contributor

Pauan commented Jan 16, 2017

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.

Rich-Harris added a commit that referenced this issue Jun 13, 2017
apply plugins before checking for options.entry
@Rich-Harris
Copy link
Contributor

This is fixed in 0.43, thanks

@plh97
Copy link

plh97 commented Jan 17, 2018

........ i also have this problom
but this issue cant make me know how to fix this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants