---
title: "Discussion on \"Make your libs smaller using private scope in JavaScript\" | Hashnode"
description: "Discussion on \"Make your libs smaller using private scope in JavaScript\". I've just made an interesting discovery when working on my Bootstrap Tags library when it comes to minified file size. Let me share with you what I found out.\nMinification with ESBuild\nI'm using ESBuild as a build tool. It's really nice and convenien..."
url: "https://hashnode.com/posts/make-your-libs-smaller-using-private-scope-in-javascript/61cb2a639d3f4828b7ba450f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Make your libs smaller using private scope in JavaScript](https://blog.lekoala.be/make-your-libs-smaller-using-private-scope-in-javascript?utm_source=hashnode&utm_medium=feed)

I've just made an interesting discovery when working on my Bootstrap Tags library when it comes to minified file size. Let me share with you what I found out. Minification with ESBuild I'm using ESBuild as a build tool. It's really nice and convenien...

Dec 28, 2021 · 3 min read · blog.lekoala.be  
Updated Feb 10, 2022  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#javascript-library](https://hashnode.com/tag/javascript-library)
-   [#js](https://hashnode.com/tag/js)
-   [#bootstrap](https://hashnode.com/tag/bootstrap)
-   [#es6](https://hashnode.com/tag/es6)

## Written by

[Thomas Portelange](https://hashnode.com/@lekoala)

@lekoala · Belgium

  
[View profile](https://hashnode.com/@lekoala)

A PHP/JS Web Developer based in Belgium

A Web Developer based in Belgium, specialized in PHP &amp; JS development

## Responses 1

Markdown supported · ⌘↵ to post

[Fiddler](https://hashnode.com/@fiddlesticks)

[Jan 21, 2023](https://hashnode.com/posts/make-your-libs-smaller-using-private-scope-in-javascript/61cb2a639d3f4828b7ba450f/comment/63cbe7960a811f9ef11c918c)

Thank you for posting. I am having a problem with it. IOS 14 shows `unexpected private name #s cannot parse class method with private name`. So I just need to pass --mingle-props=^\_ to solve it?

[Thomas Portelange](https://hashnode.com/@lekoala)

[Jan 21, 2023](https://hashnode.com/posts/make-your-libs-smaller-using-private-scope-in-javascript/61cb2a639d3f4828b7ba450f/comment/63cbe7960a811f9ef11c918c#reply-63cc10140a811f9ef11c9ed3)

yes, replace your private methods (prefixed with #) and prefix them with \_ instead and then use mangle-propos.
