# Description This package provides a baseline configuration for webpack as it is being used within our organisation. It adds:


4.4.23 months ago3 years agoMinified + gzip package size for @invisionag/webpack-config-ivx in KB




This package provides a baseline configuration for webpack as it is being used within our organisation. It adds:


  • Default entrypoint of ./src/index.js
  • babel-polyfills and fetch-polyfill


  • JS loader with babel compilation
  • CSS loader
  • SVG loader
  • Image loader
  • Markdown loader
  • Font loader

We do not ship sass loaders since we're aiming to replace it with styled-components, and node-sass is a very heavy dependency, even for dev setups.


  • HtmlWebpackPlugin takes an html template from ./src/index.html and injects scripts there


  • Runtime-chunking
  • Chunk-splitting


  • Outputs the template.html with injected scripts into the public folder, along with all chunks


  • For development mode, start an IE compatible webserver with hot reloading on port 9002


  1. Install @invisionag/webpack-config-ivx as a development dependency. No need to add webpack or any loaders.
  2. (Optional) If you want to use a dev-server to run localle, install webpack-dev-server as a development dependency. Configuration will be handled by this package


  • run yarn upgrade-interactive --latest to update dependencies
  • make sure the node image used in the Dockerfile is the latest
  • run yarn test to verify everything is still running
  • publish a new version with yarn publish (see Publishing section)


  • Make sure you are logged into NPM with npm whoami
  • Verify you are part of the invisionag organization on npm. If you aren't, ask any current member to invite you
  • Run yarn publish and enter a new version number (based on semVer)


A good way to test your changes is to publish a prerelease, then check out a repo using this config and update it to use the prerelease. Then, run this repos test suite and if everything still works, it's a good sign.

  1. Push your changes and create a PR to communicate that there is currently work going on, and to make the changes you want to introduce with the prerelease accessible to others.
  2. Publish your prerelease with yarn publish, then enter a version number ending with -my-branch-name.<someIncrementingNumber>, for example (if we are currently at 1.1.5 and you introduce minor, nonbreaking changes) 1.2.0-maintenance-july-0.
  3. check out (for example) csv-importer-ui
  4. change the version number of the dependency to this repository in the package.json to match your prerelease. You don't have to change the lockfile
  5. run yarn && yarn test.

If everything still works, you're looking good! You can now publish a regular version by running yarn publish again and simply leave the trailing prerelease stuff (1.2.0).


In your webpack.config.js, you can import this config as base config. Make sure you pass the current enviroment as an argument, so the base config can determine whether it is running in development or production mode:

const webpackConfigIvx = require('@invisionag/webpack-config-ivx');

module.exports = (env = 'development') => {
  const baseConfig = webpackConfigIvx(env);
  // ...

You can then extend the baseConfig as desired. A simple (complete) example to replace the devServer port would look like this:

module.exports = (env = 'development') => {
  const baseConfig = require('@invisionag/webpack-config-ivx')(env);
  return {
    devServer: {
      port: 9002,

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.