Introduction to webpack

Essentially, webpack is a static module bundler for modern javaScript applications. When webpack processes an application, it recursively builds a dependency graph that contains everything the application needs modules, and then package all those modules into one or more bundles.

 

Starting from webpack v4.0, it is not necessary to introduce a configuration file. However, wepack is still highly configurable. There are four core concepts you need to understand before you start:

  • entry
  • input (output)
  • loader
  • Plugins

entry [entry]

The entry point indicates which module webpack should use as the start of building its internal dependency graph. After entering the entry point, webpack will find out which modules and libraries are (directly and indirectly) dependent on the entry point.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324947426&siteId=291194637