2.7.2 • Published 4 years ago

@chialab/babel-preset v2.7.2

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

A custom set of plugins, based on the @babel/preset-env, which includes:

Install

npm install @chialab/babel-preset -D
# or
yarn add @chialab/babel-preset -D

Usage

Add to the .babelrc file the preset:

{
    "presets": [
        ["@chialab/babel-preset", { ... }]
    ],
    "plugins": [ ... ]
}

Options

The preset inherits all the @babel/preset-env options, available here.

NameAcceptsDefaultDescription
envBooleantrueShould use @babel/preset-env.
pragmaString-The JSX pragma.
pragmaModuleString-The module path which exports the pragma.
pragmaDefaultBooleanfalseImport pragma as default member.
assertionsBooleanfalsePolyfill assertion statements with Chai.
coverageBooleanfalseShould enable code coverage.
coverageIncludeArray[]A list of files to include in the coverage.
coverageExcludeArray[]A list of files to exclude from the coverage.
transformCommonjsBooleanfalseShould convert CommonJS modules.
transformCommonjsCacheBooleanfalseA Map instance to use as cache for the tranformer.