Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 2.34 KB

README.md

File metadata and controls

49 lines (40 loc) · 2.34 KB

@jitesoft/babel-preset-main

npm (scoped) Known Vulnerabilities pipeline status npm Back project

Main preset for Jitesoft javascript projects which uses babel.

Includes the following presets and plugins:

@babel/preset-env
@babel/plugin-syntax-dynamic-import
@babel/plugin-proposal-export-default-from
@babel/plugin-proposal-class-properties
@babel/plugin-proposal-decorators
@babel/plugin-proposal-nullish-coalescing-operator
@babel/plugin-proposal-object-rest-spread
@babel/plugin-proposal-optional-chaining
@babel/plugin-proposal-partial-application
@babel/plugin-proposal-private-methods
@babel/plugin-proposal-throw-expressions
@babel/plugin-transform-object-assign
@babel/plugin-transform-runtime
@babel/plugin-syntax-dynamic-import
@babel/plugin-proposal-async-generator-functions
@babel/plugin-proposal-export-namespace-from
@babel/plugin-transform-named-capturing-groups-regex
@babel/plugin-proposal-optional-catch-binding
@babel/plugin-transform-for-of
@@babel/runtime-corejs3

Requires corejs (v 3+) and @babel/core.

Options

There are a few options to make it easier to work with the preset:

  • modules - Enables or sets modules for preseet-env (defaults to auto).
  • exclude - Takes an array of plugins that should NOT be used (full plugin name including @babel) (defaults to []).
  • targets - Targets value for preset-env, if used mode will be ignored (defaults to undefined to enable mode).
  • mode - Flags build mode (web, node or undefined for default).
    • node will set the targets value to node >= 10.
    • web will set the targets value to defaults.
    • undefined/default will set the targets value to defaults, node >= 10.