How to use the ocular-dev-tools/config/webpack.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-web / loaders.gl / webpack.config.js View on Github external
module.exports = (env = {}) => {
  const config = getWebpackConfig(env);

  config.module.rules.push({
    // Load worker tests
    test: /\.worker\.js$/,
    use: {
      loader: 'worker-loader'
    }
  });

  // Uncomment to debug config
  // console.error(JSON.stringify(config, null, 2));

  return [
    config,
    // For worker tests
    // Output bundles to root and can be loaded with `new Worker('/*.worker.js')`
github uber / react-map-gl / webpack.config.js View on Github external
module.exports = env => {
  const config = getWebpackConfig(env);

  config.module.rules.push({
    // This is required to handle inline worker!
    test: /\.js$/,
    exclude: /node_modules/,
    use: [
      {
        loader: 'babel-loader',
        options: BABEL_CONFIG
      }
    ]
  });

  config.plugins = (config.plugins || []).concat([
    new webpack.DefinePlugin({
      __MAPBOX_TOKEN__: JSON.stringify(process.env.MapboxAccessToken) // eslint-disable-line
github uber / deck.gl / webpack.config.js View on Github external
module.exports = env => {
  const config = getWebpackConfig(env);
  // Unfortunately, ocular-dev-tool swallows logs...
  require('fs').writeFileSync('/tmp/ocular.log', JSON.stringify(config, null, 2));
  return config;
};
github uber-web / mjolnir.js / webpack.config.js View on Github external
module.exports = env => getWebpackConfig(env);
github uber-web / math.gl / webpack.config.js View on Github external
module.exports = (env = {}) => {
  const config = getWebpackConfig(env);

  switch (env.mode) {
    case 'size':
      config.entry = fs.readdirSync('./test/size').reduce((entries, filename) => {
        entries[filename.replace('.js', '')] = `./test/size/${filename}`;
        return entries;
      }, {});
      break;
    default:
  }

  return config;
};

ocular-dev-tools

Dev tools for our Javascript frameworks

MIT
Latest version published 6 months ago

Package Health Score

58 / 100
Full package analysis