UNPKG

babel-preset-jaid

Version:

These are my personal Babel presets. They aim for minimizing boilerplate for projects that need Babel.

30 lines 1.51 kB
/** @module babel-preset-jaid */ declare module "babel-preset-jaid" { /** * @typedef options * @type {object} * @property {boolean} [react=false] If `true` or typeof `string`, `react`-related plugins and presets are included. If `react-dom`, `react-dom`-related plugins and presets are also included. * @property {boolean} [runtime=true] If `true`, `@babel/plugin-transform-runtime` will be applied. * @property {boolean|object} [minify=true] If `false`, `babel-minify` won't be applied to production builds. If `true`, `babel-minify` will be applied with `{removeConsole: true, removeDebugger: true}` as configuration. If typeof `object`, this will be used as `babel-minify` config. * @property {null|object} [envOptions=null] If typeof `object`, this will be used as options for `@babel/preset-env`. * @property {boolean} [flow=false] If `true`, support Facebook Flow. * @property {boolean} [typescript=false] If `true`, support Microsoft TypeScript. * @property {boolean} [aotLoader=true] If `true`, `aot-loader/babel` will be applied */ export type options = { react?: boolean; runtime?: boolean; minify?: boolean | any; envOptions?: null | any; flow?: boolean; typescript?: boolean; aotLoader?: boolean; }; /** * @function default * @param {object} api Babel api instance * @param {options} options */ export default function(api: any, options: options): void; }