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

Disable minification by default #145

Open
joepie91 opened this issue Apr 13, 2022 · 0 comments
Open

Disable minification by default #145

joepie91 opened this issue Apr 13, 2022 · 0 comments

Comments

@joepie91
Copy link

joepie91 commented Apr 13, 2022

Current Behavior

dts-cli currently creates minified builds by default. This is problematic because it makes auditing the produced libraries (as a third party) much more difficult, even though there's not really any purpose to building minified libraries - anybody using a module system is very likely to already have their own minification tooling set up, since they will need it for their own application code anyway.

Expected behavior

Only producing unminified builds by default, including for production builds.

Suggested solution(s)

Disabling minified builds by default, clearly documenting this, and allowing the user to re-enable minified builds (for which there is already a configuration option).

Additional context

I've written a more detailed article here about the issues with minified builds in packages, and why it's better to not include them, also addressing some common concerns. If you have a concern that isn't covered there, I'd be happy to address it, of course :)

Especially because dts-cli isn't just a single library but rather a tool used to produce libraries, the default setting makes a lot of difference in how easy it is for people to audit their dependency trees - people tend to stick with defaults most of the time, and so whether a tool like this enables them by default or not can have a big overnight impact on many different packages.

(I'll also be filing a similar issue on tsdx, if it turns out to enable minification by default as well)

Your environment

N/A

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

No branches or pull requests

1 participant