function watchWebpack (fixture, { output, plugins, context, terserOptions, ...config } = {}) {
  context = context || path.resolve(__dirname, 'fixtures', fixture);
  /** @type {Partial<import('webpack').Compiler & { doRun(): Promise<import('webpack').Stats> }>} */
  const compiler = webpack({
    mode: 'production',
    context,
    entry: './entry.js',
    output: {
      publicPath: 'dist/',
      path: path.resolve(context, 'dist'),
      ...(output || {})
    },
    optimization: {
      minimize: true,
      minimizer: [
        new TerserPlugin({
          terserOptions: terserOptions || {
            mangle: false,
            output: {
              beautify: true
            }
          },
          sourceMap: false
        })
      ]
    },
    plugins: plugins || []
  });
  // compiler.watch({});
  compiler.doRun = () => run(compiler.run.bind(compiler));
  return compiler;
}
@param {string} fixture
@param {Partial<import('webpack').Configuration & { terserOptions?: import('terser').MinifyOptions }>} [options]