'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');
require('yn');
require('react-dev-utils/FileSizeReporter');
require('react-dev-utils/formatWebpackMessages');
require('chalk');
var server = require('./server-2c371947.cjs.js');
var config = require('./config-42c55c02.cjs.js');
require('./svgrTemplate-550efce6.cjs.js');
require('commander');
require('semver');
require('@backstage/errors');
require('child_process');
require('util');
require('webpack-dev-server');
require('react-dev-utils/openBrowser');
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 serve = async (opts) => {
  const { name } = await fs__default["default"].readJson(index.paths.resolveTarget("package.json"));
  const waitForExit = await server.serveBundle({
    entry: "dev/index",
    checksEnabled: opts.check,
    ...await config.loadCliConfig({
      args: opts.config,
      fromPackage: name,
      withFilteredKeys: true
    })
  });
  await waitForExit();
};

exports["default"] = serve;
//# sourceMappingURL=serve-7a55a330.cjs.js.map
