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

broken cli arguments (all watch options) #3018

Closed
cruzdanilo opened this issue Aug 2, 2019 · 2 comments · Fixed by #3597
Closed

broken cli arguments (all watch options) #3018

cruzdanilo opened this issue Aug 2, 2019 · 2 comments · Fixed by #3597

Comments

@cruzdanilo
Copy link

all the watch options via cli arguments are broken due to the presence of a flag/boolean argument with the same name as the config object (watch).
a valid workaround is to use those options via config file. as a personal choice, i treat the config file as a build recipe and only add options related to the build process. i prefer to keep cli ui options as cli arguments (watch.clearScreen, for example).
i would happily submit a pr fixing it if you guys have any suggestion.

  • Rollup Version: v1.18.0
  • Operating System (or Browser): macos v10.14.6
  • Node Version: v11.14.0

How Do We Reproduce?

  1. run rollup -cw --no-watch.clearScreen using any valid config file

Expected Behavior

no errors, watch mode with watch.clearScreen: false

Actual Behavior

fatal error output:

Cannot create property 'clearScreen' on boolean 'true'
@lukastaegert
Copy link
Member

Thanks for reporting this. I’m not sure we can actually make this work, the best way forward seems to me to add single word shortcuts for the command line, e.g. —no-clearScreen, or short cuts without the dot.

@lukastaegert
Copy link
Member

#3597 will finally fix this

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

Successfully merging a pull request may close this issue.

2 participants