Babel preset for Remax, a framework for building mini-programs using React. Current stable version is 2.15.14, with regular releases on GitHub. This preset configures @babel/preset-react, @babel/preset-typescript, and plugins for decorators and class properties, tailored for Remax apps. It differs from generic React presets by providing options to control React runtime, TypeScript namespace support, and legacy decorator syntax, ensuring compatibility with mini-program environments.
npm install babel-preset-remaxVerified import paths — ran on the pinned version, not inferred.
Configuration for Remax Babel preset with React automatic runtime, TypeScript namespace support, loose class properties, and disabled throw-if-namespace.
Remove 'throw-if-namespace' and set 'react.runtime' to 'automatic'.
Set 'class-properties.loose' to false if strict spec compliance is needed.
Set both 'decorators.legacy: true' and 'class-properties.loose: true'.
Upgrade @babel/core to >=7.0.0.
Use 'throw-if-namespace' as a string key in object: { 'throw-if-namespace': false }.Add 'decorators: { legacy: true }' to preset options.Install with `npm install --save-dev babel-preset-remax` and use 'remax' as preset name.