0.5.1 • Published 4 years ago
@jvdx/babel v0.5.1
@jvdx/babel
jvdx's babel preset. It includes the following presets and plugins:
Plugins
- proposal-class-properties
- proposal-nullish-coalescing-operator
- proposal-optional-chaining
- syntax-import-meta
- transform-flow-strip-types
- transform-regenerator
- macros
- transform-async-to-promises
Presets
- env
- react
- typescript
Installation
(1) Install this preset as well as its peer dependencies:
# Using npm
$ npm i -D @babel/core @jvdx/babel
# Using yarn
$ yarn add -D @babel/core @jvdx/babel
(2) Configure babel:
// babel.config.js
{
"babel": {
"presets": ["@jvdx/babel"]
}
}
Configuration
To configure the included presets/plugins, do not add them to presets or
plugins in your custom babel configuration. Instead, configure them on the
@jvdx/babel
preset, like so:
{
"babel": {
"presets": [
[
"@jvdx/babel",
{
"preset-react": {},
"preset-typescript": {},
"class-properties": {}
}
]
],
}
}
Notice: To learn more about the available options for each config, visit their documentation site.
0.5.1
4 years ago