Back to Webpack

defineConfig

examples/define-config/template.md

5.108.0582 B
Original Source

defineConfig

webpack.defineConfig wraps a configuration so editors give you full type-checking and autocompletion, with no effect at runtime. It accepts a configuration object, an array of configurations (multi-compiler), a (env, argv) => configuration function, or a Promise resolving to any of those.

webpack.config.js

javascript
_{{webpack.config.js}}_

example.js

javascript
_{{example.js}}_

dist/output.js

javascript
_{{dist/output.js}}_

Info

Unoptimized

_{{stdout}}_

Production mode

_{{production:stdout}}_