Webpack

webpack
DevelopersTobias Koppers, Sean Larkin, Johannes Ewald, Juho Vepsäläinen, Kees Kluskens, Even Stensberg and webpack contributors
Initial release19 February 2014; 12 years ago (2014-02-19)[1]
Stable release
5.107.2[2] Edit this on Wikidata / 25 May 2026; 12 days ago (25 May 2026)
Written inJavaScript
Operating systemLinux, macOS, Windows
PlatformNode.js
LicenseMIT License[3][4]
Websitewebpack.js.org Edit this at Wikidata
Repositorygithub.com/webpack/webpack

webpack is a free and open-source module bundler for JavaScript.[5][6][7][8] It is made primarily for JavaScript, but it can transform front-end assets such as HTML, CSS, and images if the corresponding loaders are included.[9] webpack takes modules with dependencies and generates static assets representing those modules.[10]

webpack takes the dependencies and generates a dependency graph allowing web developers to use a modular approach for their web application development purposes. It can be used from the command line or can be configured using a configuration file which is named webpack.config.js. This file defines rules, plugins, etc., for a project. (webpack is highly extensible via rules which allow developers to write custom tasks that they want to perform when bundling files together.)

Node.js is required to use webpack.

webpack provides code on demand using the moniker code splitting. Two similar techniques are supported by webpack when it comes to dynamic code splitting. The first and recommended approach is to use the import() syntax that conforms to the ECMAScript proposal for dynamic imports. The legacy, webpack-specific approach is to use require.ensure.[11]

webpack development server

webpack also provides a built-in development server, webpack-dev-server, that can be used as an HTTP server for serving files while developing. It also provides the capability to use hot module replacement (HMR), which updates code on a webpage without requiring the developer to reload the page.

See also

References

  1. ^ "Release Date of Version 1.0.0". Retrieved 2020-12-31.
  2. ^ "Release 5.107.2". 25 May 2026. Retrieved 26 May 2026.
  3. ^ "LICENSE file on GitHub". Retrieved 2020-12-31.
  4. ^ "License field from webpack - npm". Retrieved 2020-12-31.
  5. ^ "Web Performance Optimization with webpack". Google Inc. Retrieved 16 Oct 2018.
  6. ^ "A Beginner's Guide to webpack 4 and Module Bundling". SitePoint. Retrieved 16 Oct 2018.
  7. ^ "Webpack 4.0 Release Brings Simplified Configuration, WebAssembly Support, and Big Performance Boost". InfoQ. Retrieved 16 Oct 2018.
  8. ^ "High-performance webpack config for front-end delivery". Codementor. Archived from the original on 27 February 2021. Retrieved 16 Oct 2018.
  9. ^ "What is webpack". SurviveJS. Retrieved 16 Oct 2018.
  10. ^ "What is webpack". GitHub. Retrieved 25 Feb 2018.
  11. ^ "Dynamic imports". webpack. Retrieved 6 Jun 2022.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.