babel-preset-const-enum
JSON →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.
Traffic · last 30 days ↓14% vs prev 7d
total hits 24
actors 8 distinct systems
last hit 15h ago AhrefsBot
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇨🇭 Switzerland
Resources
API endpoints
full doc /v1/registry/babel-preset-const-enum
compatibility /v1/registry/babel-preset-const-enum/compatibility