Options (2)
-c, --configbooleanPass a configuration file (with e.g. the entry script and the output filename) and show compilation progress
Example:
webpack {{[-c|--config]}} {{webpack.config.js}} --progress-w, --watchbooleanAutomatically recompile on changes to project files
Example:
webpack {{[-w|--watch]}} {{app.js}} {{bundle.js}}Examples (4)
Create a single output file from an entry point file
webpack app.js bundle.jsLoad CSS files too from the JavaScript file (this uses the CSS loader for CSS files)
webpack app.js bundle.js --module-bind 'css=css'Pass a configuration file (with e.g. the entry script and the output filename) and show compilation progress
webpack [-c|--config] webpack.config.js --progressAutomatically recompile on changes to project files
webpack [-w|--watch] app.js bundle.jsmade by @shridhargupta | data from tldr-pages