You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the Rollup API as documented is confusing, and doesn't seem to cover this use case. bundle.generate requires an output options object, as does bundle.write. I've been clicking through various plugins, and poring through the Rollup documentation, yet I can't seem to find a single example of:
Creating two bundles
Minifying one of them
Writing to a directory
The Rollup docs seem to have a number of fairly advanced examples, but either skip the simple ones, or I can't find them, or I don't understand a) when to use entry vs. input, or b) when to include output options in the main Rollup config or in one of the bundle methods. It's not clear to me why input/output options are sometimes together, sometimes apart, sometimes called to methods (and sometimes not needed?)
I seem to recall doing this very easily with Rollup some time ago, before the documentation site was created, and it seemed quite straightforward. (This was before async/await examples.) Now the API seems quite confusing and not intuitive as to what to do here.
Your Proposal for Changes
Provide simple use cases, including a common one like creating a minified second bundle.
Bury advanced options past the initial tutorial. A lot of advanced settings are mixed in very early on, such as in the rollup.rollup API.
Explain where to put output options and why they might live in the main configuration (what that's doing).
Document bundle.write and bundle.generate (the API of bundles seems to be missing or I can't find it?)
The text was updated successfully, but these errors were encountered:
I learned that I could write each filename twice in bundle.write, but I don't understand why I can't just define the output objects in the output property, and then just do bundle.write() or bundle.write({ dir: './dist' } and have that work. It's not clear why there seems to be duplicate output options.
Documentation Is:
Please Explain in Detail...
There are a number of places / plugins that specify the Rollup configuration as one object, such as https://github.com/TrySound/rollup-plugin-terser.
However, the Rollup API as documented is confusing, and doesn't seem to cover this use case.
bundle.generate
requires an output options object, as doesbundle.write
. I've been clicking through various plugins, and poring through the Rollup documentation, yet I can't seem to find a single example of:The Rollup docs seem to have a number of fairly advanced examples, but either skip the simple ones, or I can't find them, or I don't understand a) when to use
entry
vs.input
, or b) when to include output options in the main Rollup config or in one of the bundle methods. It's not clear to me why input/output options are sometimes together, sometimes apart, sometimes called to methods (and sometimes not needed?)I seem to recall doing this very easily with Rollup some time ago, before the documentation site was created, and it seemed quite straightforward. (This was before async/await examples.) Now the API seems quite confusing and not intuitive as to what to do here.
Your Proposal for Changes
bundle.write
andbundle.generate
(the API of bundles seems to be missing or I can't find it?)The text was updated successfully, but these errors were encountered: