Skip to content

Instantly share code, notes, and snippets.

@unlocomqx
Last active May 21, 2018 05:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unlocomqx/353387e265d5c9fbc91e5224ddbb290f to your computer and use it in GitHub Desktop.
Save unlocomqx/353387e265d5c9fbc91e5224ddbb290f to your computer and use it in GitHub Desktop.
/**
* Function that mutates original webpack config.
* Supports asynchronous changes when promise is returned.
*
* @param {object} config - original webpack config.
* @param {object} env - options passed to CLI.
* @param {WebpackConfigHelpers} helpers - object with useful helpers when working with config.
**/
export default function (config, env, helpers) {
helpers.setHtmlTemplate(config, 'src/index.html');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment