@newsteam/babel-preset
TypeScript icon, indicating that this package has built-in type declarations

0.0.57 • Public • Published

@newsteam/babel-preset

License npm package npm downloads

This package provides a preset for babel.

Usage

A single babel preset is exported.

Our default export contains all of our babel plugins and presets. It requires the following peer dependencies:

    @babel/core

Installation

  1. Install the shared configuration:
npm install --save-dev @newsteam/babel-preset
  1. Install the shared configuration peer dependencies (npm 5+):
npx install-peerdeps --dev @newsteam/babel-preset
  1. Add "@newsteam/babel-preset" or your "presets" array in to your .babelrc.

Configuration

targets

string | Array<string> | { [string]: string }, defaults to {}.

Describes the environments you support/target for your project.

This can either be a browserslist-compatible query:

{
  "targets": "> 0.25%, not dead"
}

Or an object of minimum environment versions to support:

{
  "targets": {
    "chrome": "58",
    "ie": "11"
  }
}

Example environments: chrome, opera, edge, firefox, safari, ie, ios, android, node, electron.

Sidenote, this uses @babel/preset-env under the hood, so if no targets are specified it will transform all ECMAScript 2015+ code by default.

addModuleExports

boolean, defaults to false.

Enables the export default module.exports that was turned off in Babel 6.

debug

boolean, defaults to false.

Outputs the targets/plugins used and the version specified in plugin data version to console.log.

development

boolean, defaults to false.

Toggles plugins that aid in development, such as @babel/plugin-transform-react-jsx-self and @babel/plugin-transform-react-jsx-source.

Maintenance

You can run tests with npm test.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.570latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.570
0.0.560
0.0.550
0.0.540
0.0.530
0.0.520
0.0.510
0.0.500
0.0.490
0.0.480
0.0.470
0.0.460
0.0.450
0.0.440
0.0.430
0.0.420
0.0.410
0.0.400
0.0.390
0.0.370
0.0.360
0.0.350
0.0.340
0.0.330
0.0.320
0.0.310
0.0.300
0.0.290
0.0.280
0.0.271
0.0.260
0.0.250
0.0.240
0.0.230
0.0.220
0.0.210
0.0.200
0.0.190
0.0.180
0.0.170
0.0.160
0.0.150
0.0.140
0.0.130
0.0.120
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @newsteam/babel-preset

Weekly Downloads

1

Version

0.0.57

License

MIT

Unpacked Size

11.3 kB

Total Files

7

Last publish

Collaborators

  • richard.hazelden
  • jasonsouthin
  • dgroux
  • sweetlikepete