How to use the ocular-dev-tools/config/babel.config function in ocular-dev-tools

To help you get started, we’ve selected a few ocular-dev-tools 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 uber / luma.gl / babel.config.js View on Github external
module.exports = api => {
  const config = getBabelConfig(api);
  config.plugins = config.plugins || [];

  config.plugins.push(
    'version-inline',
    // NOTE: To debug our babel plugins, just reference the local modules
    // './dev-modules/babel-plugin-inline-gl-constants',
    'babel-plugin-inline-webgl-constants',
    // ['./dev-modules/babel-plugin-remove-glsl-comments', {
    [
      'babel-plugin-remove-glsl-comments',
      {
        patterns: ['**/shadertools/src/modules/**/*.js']
      }
    ]
  );
github uber-web / loaders.gl / examples / babel.config.local.js View on Github external
module.exports = api => {
  const config = getBabelConfig(api);

  config.plugins = config.plugins || [];
  config.plugins.push([
    'babel-plugin-inline-import',
    {
      extensions: ['.worker.js']
    }
  ]);

  // https://babeljs.io/docs/en/options#overrides
  const overrides = config.overrides || [];
  // TEST to prevent compilation of already transpiled files
  // These files should be copied without any modification
  overrides.push({
    test: /min.js|transpiled.js/,
    compact: false,
github uber-web / loaders.gl / babel.config.js View on Github external
module.exports = api => {
  const config = getBabelConfig(api);

  config.plugins = config.plugins || [];
  config.plugins.push('version-inline');

  // https://babeljs.io/docs/en/options#overrides
  const overrides = config.overrides || [];
  // TEST to prevent compilation of already transpiled files
  // TODO: Ideally these files should be copied to the right dist folder without any further modification
  // It still seems they are being parsed by babel which does take a relatively long time
  overrides.push({
    test: /src\/libs/,
    compact: false,
    sourceMaps: false
  });
  // Default babel config (env, plugin) only apply to the rest of the files
  overrides.push({
github uber / react-map-gl / babel.config.js View on Github external
module.exports = api => {
  const config = getBabelConfig(api);

  config.presets = (config.presets || []).concat(['@babel/flow', '@babel/preset-react']);
  config.plugins = (config.plugins || []).concat('@babel/proposal-class-properties');

  return config;
};
github uber-web / mjolnir.js / babel.config.js View on Github external
module.exports = api => getBabelConfig(api);
github uber / streetscape.gl / babel.config.js View on Github external
module.exports = api => {
  const config = getBabelConfig(api);

  config.presets = config.presets || [];

  config.presets.push('@babel/react', '@babel/flow');

  config.plugins = config.plugins || [];

  config.plugins.push('version-inline', '@babel/proposal-class-properties');

  return config;
};
github uber-web / math.gl / babel.config.js View on Github external
module.exports = api => {
  return getBabelConfig(api, {
    plugins: [['transform-builtin-extend', {globals: ['Array']}]]
  });
};
github uber / xviz / babel.config.js View on Github external
module.exports = api => {
  const config = getBabelConfig(api);
  config.plugins = config.plugins || [];

  config.plugins.push('version-inline', '@babel/proposal-class-properties', [
    'babel-plugin-inline-import',
    {
      extensions: ['.worker.js']
    }
  ]);

  return config;
};
github uber / deck.gl / babel.config.js View on Github external
module.exports = api => {
  const config = getBabelConfig(api);

  config.plugins.push('version-inline', 'inline-webgl-constants', [
    'remove-glsl-comments',
    {
      patterns: ['**/*.glsl.js']
    }
  ]);

  return config;
};

ocular-dev-tools

Dev tools for our Javascript frameworks

MIT
Latest version published 25 days ago

Package Health Score

70 / 100
Full package analysis