Babel preset used by the Enact framework for building React-based applications. Current stable version is 0.1.16, with maintenance releases updating dependencies. It provides a pre-configured set of Babel plugins and presets optimized for Enact projects. Key differentiators include tailored support for Enact's component model and seamless integration with Enact CLI, which includes it by default. For non-Enact projects, it can be installed separately to leverage similar transforms. Releases are infrequent, focusing on dependency updates rather than feature additions.
npm install babel-preset-enactVerified import paths — ran on the pinned version, not inferred.
Shows how to install and configure babel-preset-enact in a non-Enact CLI project, including a basic React component.
Update to version 0.1.10 or later to remove deprecated plugins like @babel/plugin-transform-react-inline-elements.
Ensure your project depends on @enact/core and other Enact packages, or use a more generic preset like @babel/preset-react.
Upgrade React to a version compatible with the removal, or if using React 19, consider adding the plugin back manually.
Update your ESLint config to use @stylistic/js rules if you rely on the replaced rules.
For Enact CLI projects, do not install this preset separately; the CLI includes it automatically.
Use full package name: "babel-preset-enact" instead of just "enact".
In .babelrc, ensure presets array contains strings, not objects. Example: { "presets": ["babel-preset-enact"] }Ensure .babelrc includes 'babel-preset-enact' and that @babel/core is installed.