'use strict';

var fs = require('fs-extra');
require('webpack');
require('path');
require('fork-ts-checker-webpack-plugin');
require('html-webpack-plugin');
require('react-dev-utils/ModuleScopePlugin');
require('run-script-webpack-plugin');
require('webpack-node-externals');
require('@backstage/cli-common');
require('@manypkg/get-packages');
require('./paths-5887046a.cjs.js');
require('mini-css-extract-plugin');
var index = require('./index-09611511.cjs.js');
require('./run-a95417b1.cjs.js');
require('eslint-webpack-plugin');
require('lodash/pickBy');
var bundle = require('./bundle-a259a726.cjs.js');
require('webpack-dev-server');
require('react-dev-utils/openBrowser');
var parallel = require('./parallel-8286d3fa.cjs.js');
var config = require('./config-42c55c02.cjs.js');
require('./svgrTemplate-550efce6.cjs.js');
require('commander');
require('chalk');
require('semver');
require('@backstage/errors');
require('child_process');
require('util');
require('yn');
require('react-dev-utils/FileSizeReporter');
require('react-dev-utils/formatWebpackMessages');
require('os');
require('worker_threads');
require('@backstage/config-loader');
require('@backstage/config');
require('./PackageGraph-5fbc300a.cjs.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);

var build = async (opts) => {
  const { name } = await fs__default["default"].readJson(index.paths.resolveTarget("package.json"));
  await bundle.buildBundle({
    entry: "src/index",
    parallelism: parallel.getEnvironmentParallelism(),
    statsJsonEnabled: opts.stats,
    ...await config.loadCliConfig({
      args: opts.config,
      fromPackage: name
    })
  });
};

exports["default"] = build;
//# sourceMappingURL=build-44e9420f.cjs.js.map
