Skip to content

Babel preset for the browser and node. Geared toward React.

License

Notifications You must be signed in to change notification settings

boldr/babel-preset-boldr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Steven Truesdell
Sep 15, 2017
34ff923 Β· Sep 15, 2017

History

10 Commits
Aug 29, 2017
Sep 15, 2017
Jul 31, 2017
Aug 29, 2017
Jun 3, 2017
Aug 29, 2017
Jun 3, 2017
Jul 31, 2017
Jul 31, 2017
Sep 15, 2017
Sep 15, 2017
Sep 15, 2017

Repository files navigation

babel-preset-boldr

Babel preset for Boldr.

babel-plugin-universal-import and babel-plugin-styled-components are included and enabled by default. If you don't need them, they can be disabled by passing universal: false and/or styled: false to the preset's options.

Options

const defaults = {
  // log output to the console
  verbose: false,
  // es modules enabled/disabled -- accepts: commonjs, false, umd, etc
  modules: false,
  // Prefer built-ins over custom code. This mainly benefits for modern engines.
  useBuiltIns: true,
  // Whether to enable source map output
  sourceMaps: true,
  // Enable full compression on production scripts or basic compression for libraries or during development.
  compression: false,
  // Keeping comments to be compatible with Webpack's magic comments
  comments: true,
  // Do not apply general minification by default
  minified: true,
  // Env Settings
  looseMode: true,
  specMode: false,
  // transform-runtime
  // -- generators
  regen: false,
  // -- helpers
  rtHelpers: false,
  // -- require polyfill
  polyfill: false,
  // fast async
  // -- transpile using spec helpers -- no run time required, but slower.
  // --- !!! MUST be false if nodentRt is true
  faSpecMode: true,
  // -- use nodent runtime for async/await - much faster than babel
  nodentRt: false,
  targets: {
    uglify: true,
    browsers: 'last 2 versions',
  },
  exclude: ['transform-regenerator', 'transform-async-to-generator'],
  // Lodash Plugin Settings
  lodashInc: ['lodash', 'async', 'ramda', 'recompose'],
  styled: true,
  universal: true,
}

Browser default options:

[
  ["boldr", {
    "verbose": false,
    "modules": false,
    "useBuiltIns": true,
    "targets": { "browsers": "last 2 versions"}
  }]
]

Node default options:

[
  ["boldr", {
    "verbose": false,
    "modules": false,
    "useBuiltIns": true,
    "targets": { "node": "current"}
  }]
]

Included Presets:

Included Plugins:

Production - React:

Development - React:

About

Babel preset for the browser and node. Geared toward React.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published