@jitesoft/babel-preset-main
v5.6.0
Published
Babel preset with configurations for Jitesoft projects.
Downloads
166
Readme
@jitesoft/babel-preset-main
Main preset for Jitesoft javascript projects which uses babel.
Includes the following presets and plugins:
@babel/preset-env
@babel/plugin-proposal-async-do-expressions
@babel/plugin-proposal-decorators
@babel/plugin-proposal-export-default-from
@babel/plugin-proposal-function-bind
@babel/plugin-proposal-partial-application
@babel/plugin-proposal-pipeline-operator
@babel/plugin-proposal-record-and-tuple
@babel/plugin-proposal-throw-expressions
@babel/plugin-transform-object-assign
@babel/plugin-transform-runtime
@babel/runtime-corejs3
@babel/plugin-proposal-regexp-modifiersRequires corejs (v 3+) and @babel/core.
Options
This preset uses the same options as preset-env including the options that the different
plugins have.
Other than those, the following options are possible to use:
exclude- Takes an array of plugins that should NOT be used (full plugin name including@babel) (defaults to[]).mode- Flags build mode (web,nodeor undefined for default).nodewill set the targets value tonode >= 14.webwill set the targets value todefaults.undefined/defaultwill set the targets value todefaults, node >= 12.
recordAndTuplesyntaxType(defaults to 'hash)polyfill(defaults to false)polyfillModuleName(defaults to peerDependency@bloomberg/record-tuple-polyfill)
decoratorsversion(defaults to2023-01)
pipelinepoposal(defaults tohack)topicToken(defaults to^^)
Excluding
When excluding plugins and presets, the values checked are not the whole name with scope and all. So you
can use shorter forms in your exclude array.
The following values are checked with a indexOf check:
preset-env => @babel/preset-env
decorators => @babel/plugin-proposal-decorators
transform-runtime => @babel/plugin-transform-runtime
partial-application => @babel/plugin-proposal-partial-application
throw-expressions => @babel/plugin-proposal-throw-expressions
async-do-expressions => @babel/plugin-proposal-async-do-expressions
function-bind => @babel/plugin-proposal-function-bind
pipeline-operator => @babel/plugin-proposal-pipeline-operator
record-and-tuple => @babel/plugin-proposal-record-and-tuple
export-default-from => @babel/plugin-proposal-export-default-from
object-assign => @babel/plugin-transform-object-assign
regexp-modifiers => @babel/plugin-proposal-regexp-modifiers