WebPack - webpack.config.js

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





Discover More
Welcome From Browser
How to develop, publish and use a javascript library ?

A step by step tutorial on how to create and publish a javascript library
React - Typescript

typescript integration in React Not all packages include declaration files. TypeScript will looks in the @types/react package. Install typescript and ts-loader...
WebPack - Entry point

An entry point indicates which module webpack should use to begin building out its internal dependency graph. Every dependency is then processed and outputted into files called bundles. Entry points...
WebPack - Getting Started - Example =

A summary of the getting started page of Webpack. See also: In this setup: The dependencies are not explicit declared. It is not immediately...
WebPack - Output (bundle)

How to write the compiled files to disk. webpack.config.js
WebPack - Plugin (Task)

Plugins are build tasks. require() it Add it to the plugins array. Call it with the new operator because a plugin can be use multiple times with different config. ...
Webpack - Dev Server

The WebPack dev is a little Node.js Express web server that implements live-reloading In the root directory (where your is), run: This will start a server, listening on connections from localhost...



Share this page:
Follow us:
Task Runner