X

Sections

Get StartedContribute

Target

Edit this Page  
todo
Compare with the concept page and determine what goes where.

target

string

Tell webpack what environment the application is targeting. The following options are supported:

target: "web" - Compile for usage in a browser

target: "webworker" - Compile as a WebWorker

target: "node" - Compile for NodeJS, using require to load chunks

target: "node-webkit" - Compile for Webkit, using JSONP to load chunks

tip
Allows importing of built-in node modules and nw.gui (experimental).

target: "async-node" - Use fs and vm to load chunks asynchronously

target: "electron" - Compile for Electron

tip
Allows importing of Electron-specific modules.

It defaults to:

target: "web"

Contributors:

Contributor to this pageContributor to this page