How to use the @babel/cli/lib/babel/options.js.default function in @babel/cli

To help you get started, we’ve selected a few @babel/cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FelixKuehl / cra-monorepo / packages / library-utils / bin / start.js View on Github external
function startDev(type = 'default') {
  type === 'withStorybook'
    ? console.log(
        chalk.cyan('Starting styleguide and babel watcher...\u001b[39m')
      )
    : console.log(chalk.cyan('Starting babel watcher...\u001b[39m'))

  // Spawn Babel server
  process.env.NODE_ENV = 'development'
  const opts = parseArgv([
    process.argv[0],
    process.argv[1],
    '-w',
    '--presets=react-app',
    'src',
    '--out-dir',
    'es',
    '--copy-files',
    '--delete-dir-on-start',
    '--ignore',
    '__tests__,spec.js,test.js,__snapshots__'
  ])
  dirCommand(opts).catch(err => {
    console.error(err)
    process.exit(1)
  })