@repodog/babel-config

7.0.3 • Public • Published

@repodog/babel-config

The Repodog Babel config.

npm version License: MIT

Install package and peer dependencies

# terminal
npm install @repodog/babel-config @babel/core @babel/runtime --save-dev

Install optional peer dependency

# terminal
npm install @rollup/plugin-babel --save-dev

Use package

// babel.config.cjs
const repodogConfig = require('@repodog/babel-config');

module.exports = api => ({
  ...repodogConfig(api),
});

Usage with rollup

const rollupConfig = require('@repodog/rollup-config');
const babelConfig = require('@repodog/babel-config/rollup');
const { babel: babelPlugin } = require('@rollup/plugin-babel');

module.exports = {
  ...rollupConfig({ compiler: babelPlugin(babelConfig) }),
};

Environment variables

BABEL_DISABLE_CACHE = 'true' || 'false'

Disables the Babel cache. Default 'false'.

JS_ENV = 'web' || 'node'

Used as cache key when Babel cache is enabled.

NODE_ENV = 'production' || 'development' || 'test'

Ignores test files when NODE_ENV is not 'test'.

You cam also use the environment variables outlined in @repodog/babel-preset to control what is output.

Dependencies (1)

Dev Dependencies (1)

Package Sidebar

Install

npm i @repodog/babel-config

Weekly Downloads

102

Version

7.0.3

License

MIT

Unpacked Size

4.14 kB

Total Files

5

Last publish

Collaborators

  • dylanaubrey