01 / 01

What is output property used for?

The output property tells webpack where to emit the bundles it creates and how to name these files. It defaults to ./dist/main.js for the main output file and to the ./dist folder for any other generated file.

  1. 1

    while there can be multiple entry points, only one output configuration is specified.

  2. 2

    The minimum requirement for the output property in your webpack configuration is to set its value to an object and provide an output.filename to use for the output file

  3. 3

    If your configuration creates more than a single 'chunk' (as with multiple entry points or when using plugins like CommonsChunkPlugin), you should use substitutions to ensure that each file has a unique name.

javascript