How to use the af-webpack/dev function in af-webpack

To help you get started, we’ve selected a few af-webpack 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 sorrycc / roadhog / src / dev.js View on Github external
}),
    new BigBrother({
      cwd,
      tool: {
        name: 'roadhog',
        version: roadhogPkg.version,
        stagesPath,
      },
    }),
  );

  function onCompileDone() {
    notify.onDevComplete({ name: 'roadhog', version: '2-beta' });
  }

  dev({
    webpackConfig,
    proxy: config.proxy || {},
    beforeServer(devServer) {
      try {
        applyMock(devServer);
      } catch (e) {
        console.log(e);
      }
    },
    afterServer(devServer) {
      returnedWatchConfig(devServer);
    },
    openBrowser: true,
    onCompileDone() {
      once(onCompileDone);
    },