Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Added feat to write to different output file. #36

Closed
wants to merge 1 commit into from
Closed

Added feat to write to different output file. #36

wants to merge 1 commit into from

Conversation

Symbitic
Copy link

I know in issue #29 you said you didn't want this feature added, but please hear me out.

I added this because I'm trying to port Babylon.js to Rollup. The core module alone takes 2 minutes for the UMD bundle, and the minified UMD bundle takes another 2 min and 30 seconds. I can majorly cut that down by only generating the bundle once and then just writing normal and minified to different files.

The only change is that terser({ filename: "custom.js" }) will write to "custom.js" and leave the regular output file untouched. It's literally just a few extra lines of code (just adding an extra promise at the end), and all tests still pass.

Please consider this.

@TrySound
Copy link
Owner

Hi, thanks for this. Though I think such feature fits better into pipeline and may spend less time than duplicated build TrySound/rollup-plugin-uglify#61

@Symbitic
Copy link
Author

Symbitic commented Jul 2, 2019

Can you please explain how that pull request relates to this?
The whole point of this is to avoid duplicated builds if a minified and non-minified bundle are desired.

@TrySound
Copy link
Owner

TrySound commented Jul 2, 2019

Build itself will not be duplicated. Only generation will be called twice with this feature.

@Symbitic
Copy link
Author

Symbitic commented Jul 9, 2019

I think I understand. So I'm gonna close this. Thanks for your answers.

@Symbitic Symbitic closed this Jul 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants