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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup does not error when full plugin name is passed onto the command line #3646

Closed
TimvdLippe opened this issue Jun 22, 2020 · 1 comment · Fixed by #3647
Closed

Rollup does not error when full plugin name is passed onto the command line #3646

TimvdLippe opened this issue Jun 22, 2020 · 1 comment · Fixed by #3647

Comments

@TimvdLippe
Copy link
Contributor

Expected Behavior

Specifying a plugin name that does not have any effect should return an exit code 1. E.g. The following command should fail:

npx rollup -c --plugin rollup-plugin-terser

For the code snippet:

console.log('main entry');

const this_should_be_minified = 42;

function addAFunction() {
  return this_should_be_minified;
}

console.log(addAFunction());

Actual Behavior

The commandline silently accepts the name, but does not do anything. E.g. it rolls up, but does not minify and keeps the original source file intact.

The correct version should have been

npx rollup -c --plugin terser

If you run this command, then it correctly minifies and exits cleanly:

console.log("main entry");console.log(42);
@lukastaegert
Copy link
Member

Thanks for bringing this up, I created #3647 to address this, please check

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