Table of Contents

About

webpack.config.js is the configuration file of Webpack.

See https://webpack.js.org/concepts/configuration/

The file is generally located to the root directory of the project.

Example

const path = require('path');

module.exports = {
  entry: './src/index.js',
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist')
  }
};

where: CommonJs (Node.js) - Module.exports