Difference between revisions of "Webpack"

From wikieduonline
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[wikipedia:Webpack]] JavaScript module bundler
+
[[wikipedia:Webpack]] JavaScript [[module]] bundler
 
* https://webpack.js.org/
 
* https://webpack.js.org/
  
 
* <code>[[brew install webpack]]</code>
 
* <code>[[brew install webpack]]</code>
 +
* <code>[[webpack --help]]</code>
 +
  
 
  [[package.json]]:  "[[build]]": "webpack"
 
  [[package.json]]:  "[[build]]": "webpack"
  
<pre>
 
webpack --help
 
Usage: webpack [entries...] [options]
 
Alternative usage to run commands: webpack [command] [options]
 
 
The build tool for modern web applications.
 
 
Options:
 
  -c, --config <value...>                Provide path to a webpack configuration file e.g. ./webpack.config.js.
 
  --config-name <value...>              Name of the configuration to use.
 
  -m, --merge                            Merge two or more configurations using 'webpack-merge'.
 
  --env <value...>                      Environment passed to the configuration when it is a function.
 
  --node-env <value>                    Sets process.env.NODE_ENV to the specified value.
 
  --progress [value]                    Print compilation progress during build.
 
  -j, --json [value]                    Prints result as JSON or store it in a file.
 
  -d, --devtool <value>                  Determine source maps to use.
 
  --no-devtool                          Do not generate source maps.
 
  --entry <value...>                    The entry point(s) of your application e.g. ./src/main.js.
 
  --mode <value>                        Defines the mode to pass to webpack.
 
  --name <value>                        Name of the configuration. Used when loading multiple configurations.
 
  -o, --output-path <value>              Output location of the file generated by webpack e.g. ./dist/.
 
  --stats [value]                        It instructs webpack on how to treat the stats e.g. verbose.
 
  --no-stats                            Disable stats output.
 
  -t, --target <value...>                Sets the build target e.g. node.
 
  --no-target                            Negative 'target' option.
 
  -w, --watch                            Watch for files changes.
 
  --no-watch                            Do not watch for file changes.
 
  --watch-options-stdin                  Stop watching when stdin stream has ended.
 
  --no-watch-options-stdin              Do not stop watching when stdin stream has ended.
 
 
Global options:
 
  --color                                Enable colors on console.
 
  --no-color                            Disable colors on console.
 
  -v, --version                          Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
 
  -h, --help [verbose]                  Display help for commands and options.
 
 
Commands:
 
  build|bundle|b [entries...] [options]  Run webpack (default command, can be omitted).
 
  configtest|t [config-path]            Validate a webpack configuration.
 
  help|h [command] [option]              Display help for commands and options.
 
  info|i [options]                      Outputs information about your system.
 
  serve|server|s [entries...]            Run the webpack dev server. To see all available options you need to install 'webpack', 'webpack-dev-server'.
 
  version|v [commands...]                Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
 
  watch|w [entries...] [options]        Run webpack and watch for files changes.
 
  
To see list of all supported commands and options run 'webpack --help=verbose'.
+
[webpack.Progress] .../... [[TerserPlugin]]
  
Webpack documentation: https://webpack.js.org/.
 
CLI documentation: https://webpack.js.org/api/cli/.
 
Made with ♥ by the webpack team.
 
</pre>
 
  
 
== See also ==
 
== See also ==

Latest revision as of 09:47, 13 October 2022

Advertising: