2.0.1 • Published 2 years ago
babel-preset-beemo v2.0.1
babel-preset-beemo
A modern Babel preset with built-in TypeScript support. Is designed for unit testing, linting, and local development only -- it should not be used for package building, use Packemon instead.
yarn install --dev babel-preset-beemo
Setup
Add the preset to your root babel.config.js
.
module.exports = {
presets: ['beemo'],
};
Features
- Configures the
env
preset for the current Node.js version. - Enables the
typescript
preset by default. TypeScript everywhere! - Enables native
async
/await
and avoids Regenerator. - Enables
export
default and namespace from syntax. - Supports the
react
preset and both JSX runtimes. - Converts
__DEV__
conditionals toprocess.env
checks.
Options
The following options can be passed to the preset.
decorators
(boolean
) - Enable TypeScript decorators. If true, will toggle Babel into loose mode. Defaults tofalse
.loose
(boolean
) - Turn on Babel loose mode for all plugins. Defaults tofalse
.modules
(boolean
) - Force transpilation to use ECMA script module syntax. Defaults tofalse
(auto
modules).react
(boolean | classic | automatic
) - Enable the React plugin and the defined JSX runtime. Defaults tofalse
.targets
(Record<string, string> | string[] | string
) - Override the target environment. Defaults to Node.jscurrent
.
module.exports = {
presets: [['beemo', { decorators: true, react: 'automatic' }]],
};
2.0.1
2 years ago
2.0.0
2 years ago
1.0.10
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.0.1-alpha.1
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.5
3 years ago
0.0.1-alpha.0
3 years ago