Skip to content

gapspt/glov-build-babel

 
 

Repository files navigation

Babel task processor for glov-build

Installation requires also installing @babel/core and related modules.

npm install --save-dev glov-build-babel @babel/core @babel/preset-env

API usage:

const babel = require('glov-build-babel');

gb.task({
  name: ...,
  input: ...,
  ...babel(options),
});

Options

  • babel - optional options object to pass to babel
  • sourcemap - optional options object to pass to glov-build-sourcemap

Example usage:

const babel = require('glov-build-babel');

gb.task({
  name: 'client_js_babel_files',
  input: ['client/**/*.js','common/**/*.js'],
  target: 'dev',
  ...babel({
    sourcemap: {
      inline: true,
    },
    babel: {
      babelrc: false,
      presets: [['@babel/env', {
        targets: {
          ie: '10'
        },
        loose: true,
      }]],
      plugins: [
        ['some-babel-plugin', {}],
      ]
    }
  })
});

About

Babel task processor for glov-build

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%