webpack Getting started with webpack Webpack Simple Example


Example

The minimum required to use Webpack is the following command:

webpack ./src/index.js ./dist/bundle.js

// this is equivalent to:

webpack source-file destination-file

Web pack will take the source file, compile to the output destination and resolve any dependencies in the source files.