RevealTheme logo

JavaScript Küçültücü

Temel JavaScript küçültme: gereksiz yorumları ve boşlukları kaldırır. Üretim için gerçek bir küçültücü (Terser, esbuild) kullanın.

Bu araç nasıl kullanılır

  1. 1

    Paste or type your JavaScript into the input textarea.

  2. 2

    The minified output appears instantly in the panel below as you type — there is no button to press.

  3. 3

    Check the size readout (original length, an arrow, and minified length) to see how much was removed.

  4. 4

    Select the text in the output box and copy it manually into your file.

JavaScript Küçültücü Nedir?

JavaScript küçültme, paket boyutunu ve ayrıştırma süresini azaltır. Bu araç, temel boşluk ve yorum kaldırma işlemi yapar. Üretim paketleri için Terser, esbuild veya SWC kullanın: bunlar, çok daha küçük çıktı üreten (genellikle %60 ila %80 azalma) ad gizleme ve ölü kod kaldırma işlemleri gerçekleştirir.

Yaygın kullanım örnekleri

  • Quickly shrinking a short, comment-heavy snippet before pasting it into a tight inline <script> tag.

  • Stripping comments out of a code sample to share a compact version in a chat or gist.

  • Estimating roughly how much comment and whitespace overhead a small file carries before setting up a real build.

  • Cleaning up a hand-written configuration object or constant block that has no strings containing slashes.

  • Demonstrating to students or teammates what basic comment and whitespace removal looks like versus a real compiler.

  • Minifying a tiny utility function for a bookmarklet where pulling in a full toolchain is overkill.

Sıkça sorulan sorular

Terser ile karşılaştırıldığında nasıl?
Terser çok daha agresiftir: ad gizleme, ölü kod kaldırma vb. Bu araç yalnızca yorumları ve boşlukları kaldırır.
Bu, kodumu bozar mı?
Yalnızca JS'inizde sözdizimi sorunları varsa (belirsiz konumlarda eksik noktalı virgüller). Modern JavaScript güvenlidir.

İlgili araçlar