require('../../build-tools')('smi-precompile', './precompile.js', {
  inject: ['./browser-shim.js'],
  external: ['fs', 'os', 'child_process', 'crypto', 'tty'],
  setup(build) {
    build.onResolve({ filter: /^path$/ }, _args => ({ path: require.resolve('path-browserify') }));
    build.onResolve({ filter: /^process$/ }, _args => ({ path: require.resolve('process/browser') }));
  },
  useDefine: true // RC3 loads precompile with the define function, so we need to support that in the UMD build
});
