1.0.0 • Published 4 years ago

@hedytech/babel-preset-main v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@hedytech/babel-preset-main

npm (scoped) npm

Main preset for Hedy projects which uses babel.

This package includes the following presets and plugins:

@babel/plugin-proposal-class-properties
@babel/plugin-proposal-decorators
@babel/plugin-proposal-export-default-from
@babel/plugin-proposal-export-namespace-from
@babel/plugin-proposal-nullish-coalescing-operator
@babel/plugin-proposal-object-rest-spread
@babel/plugin-proposal-optional-chaining
@babel/plugin-proposal-throw-expressions
@babel/plugin-syntax-dynamic-import
@babel/plugin-transform-dotall-regex
@babel/plugin-transform-runtime
@babel/preset-env

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).
  • 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 >= 8
    • web will set the targets value to > 0.25%, not dead
    • undefined/default will set the targets value to > 0.25%, not dead, node >= 8

Thanks

Inspired by @jitesoft/babel-preset-main