babel-preset-const-enum

JSON →
library 1.0.0 ·javascript
verified May 27, 2026

Babel preset for transforming TypeScript const enums. Version 1.0.0. It runs babel-plugin-const-enum only on .ts/.tsx files to prevent syntax errors on non-TypeScript files. Provides two transform options: removeConst (default) reverts const enum to regular enum, while constObject inlines values into a const object literal for minification. Must be placed after @babel/preset-typescript in the preset order to work correctly. Lightweight, focused solution for using const enums with Babel.

total hits 24
actors 8 distinct systems
last hit 15h ago AhrefsBot
Amazonbot
4
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
ChatGPT-User
1
Humans
1

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇨🇭 Switzerland