-
Notifications
You must be signed in to change notification settings - Fork 125
cli
$ npm install webpack -gThe webpack command is now available globally.
webpack <entry> <output>Pass a file or a request string. You can pass multiple entries (every entry is loaded on startup).
If you pass a pair in the form <name>=<request> you can create an additional entry point.
It will be mapped to the configuration option entry.
Pass a path to a file.
It will be mapped to the configuration options output.path and output.filename.
Many configuration options are mapped from CLI options. I. e. --debug maps to debug: true, or --output-library-target to output.libraryTarget.
You see a list of all options, if you don't pass any option.
Some plugins are mapped to CLI options. I. e. --define <string>=<string> maps to the DefinePlugin.
You see a list of all options, if you don't pass any option.
Equals to --debug --devtool source-map --output-pathinfo
Equals to --optimize-minimize --optimize-occurence-order
Watches all dependencies and recompile on change.
Note: It's recommended to combine it with
--cache.
Display a compilation progress to stderr.
Write JSON to stdout instead of a human readable format.
Hint: Try to put the result into the anaylse tool.
Use colors to display the statistics.
Sort the modules/chunks/assets list by a column.
Display the separation of the modules into chunks.
Show more information about the reasons why a module is included.
webpack 👍