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

Options for bundle#generate() are incorrectly passed #3222

Closed
Comandeer opened this issue Nov 10, 2019 · 1 comment · Fixed by #3223
Closed

Options for bundle#generate() are incorrectly passed #3222

Comandeer opened this issue Nov 10, 2019 · 1 comment · Fixed by #3223

Comments

@Comandeer
Copy link
Contributor

  • Rollup Version: 1.26.4
  • Operating System (or Browser): macOS 10.15.1
  • Node Version: 12.6.0

How Do We Reproduce?

I've prepared repo with minimal reproduction: https://github.com/Comandeer/bugs-reports/tree/rollup-output-options

To reproduce the problem, clone the repo and run:

npm i && npm start

Expected Behavior

Rollup correctly creates bundle and display info about it.

Actual Behavior

Error is thrown:

Error: You must specify "output.format", which can be one of "amd", "cjs", "system", "esm", "iife" or "umd".

It seems that bundle#generate() does not get options.output options. Passing same object to rollup#rollup() and bundle#generate() works correctly in 1.26.3, it stopped working in 1.26.4 (probably due to https://github.com/rollup/rollup/pull/3217/files#diff-c5fd8e65630bd641bf07130346ee8778R438 ).

@lukastaegert
Copy link
Member

Sorry about that. Fix at #3223. To my defence, this is a completely undocumented and untested feature from before my time, and also a somewhat dirty one as it only works if there is a single output and there was obviously no validation.

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.

2 participants