@repodog/babel-config
v7.0.3
Published
The Repodog Babel config module.
Downloads
124
Readme
@repodog/babel-config
The Repodog Babel config.
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.