From d9121b39a1d76339b7966279f198c2d8d3fdff5c Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Fri, 26 Sep 2025 19:27:11 +0300 Subject: [PATCH] docs: use markdown instead html (#19938) --- README.md | 35 +- ...in_CODE_OF_CONDUCT_06e7b335922db99b918d.md | 2 +- ...ebpack_main_README_c9ec0fd496c92f077657.md | 673 ++++++++++++++++++ .../http-url/errors.webpack.lock | 4 +- ...in_CODE_OF_CONDUCT_06e7b335922db99b918d.md | 1 - .../http-url/frozen-verify.webpack.lock | 4 +- ...in_CODE_OF_CONDUCT_06e7b335922db99b918d.md | 1 - ...ebpack_main_README_c9ec0fd496c92f077657.md | 673 ++++++++++++++++++ .../asset-modules/http-url/index.js | 8 +- .../http-url/no-cache.webpack.lock | 4 +- .../http-url/prod-defaults.webpack.lock | 4 +- ...in_CODE_OF_CONDUCT_06e7b335922db99b918d.md | 1 - ...ebpack_main_README_c9ec0fd496c92f077657.md | 673 ++++++++++++++++++ 13 files changed, 2050 insertions(+), 33 deletions(-) create mode 100644 test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md delete mode 100644 test/configCases/asset-modules/http-url/errors.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_CODE_OF_CONDUCT_06e7b335922db99b918d.md delete mode 100644 test/configCases/asset-modules/http-url/frozen-verify.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_CODE_OF_CONDUCT_06e7b335922db99b918d.md create mode 100644 test/configCases/asset-modules/http-url/frozen-verify.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md delete mode 100644 test/configCases/asset-modules/http-url/prod-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_CODE_OF_CONDUCT_06e7b335922db99b918d.md create mode 100644 test/configCases/asset-modules/http-url/prod-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md diff --git a/README.md b/README.md index a210a6db9..fc5b1ec7d 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ - [Backers](#backers) - [Special Thanks](#special-thanks-to) -

Install

+## Install Install with npm: @@ -60,7 +60,7 @@ Install with yarn: yarn add webpack --dev ``` -

Introduction

+## Introduction Webpack is a bundler for modules. The main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, @@ -88,7 +88,7 @@ Check out webpack's quick [**Get Started**](https://webpack.js.org/guides/gettin Webpack supports all browsers that are [ES5-compliant](https://kangax.github.io/compat-table/es5/) (IE8 and below are not supported). Webpack also needs `Promise` for `import()` and `require.ensure()`. If you want to support older browsers, you will need to [load a polyfill](https://webpack.js.org/guides/shimming/) before using these expressions. -

Concepts

+## Concepts ### [Plugins](https://webpack.js.org/plugins/) @@ -265,7 +265,7 @@ If you're working on webpack itself, or building advanced plugins or integration [tapable-tracer-npm]: https://img.shields.io/npm/v/tapable-tracer.svg -

Contributing

+## Contributing **We want contributing to webpack to be fun, enjoyable, and educational for anyone, and everyone.** We have a [vibrant ecosystem](https://medium.com/webpack/contributors-guide/home) that spans beyond this single repo. We welcome you to check out any of the repositories in [our organization](https://github.com/webpack) or [webpack-contrib organization](https://github.com/webpack-contrib) which houses all of our loaders and plugins. @@ -284,11 +284,11 @@ Contributions go far beyond pull requests and commits. Although we love giving y To get started have a look at our [documentation on contributing](https://github.com/webpack/webpack/blob/main/CONTRIBUTING.md). -

Creating your own plugins and loaders

+### Creating your own plugins and loaders If you create a loader or plugin, we would <3 for you to open source it, and put it on npm. We follow the `x-loader`, `x-webpack-plugin` naming convention. -

Support

+## Support We consider webpack to be a low-level tool used not only individually but also layered beneath other awesome tools. Because of its flexibility, webpack isn't always the _easiest_ entry-level solution, however we do believe it is the most powerful. That said, we're always looking for ways to improve and simplify the tool without compromising functionality. If you have any ideas on ways to accomplish this, we're all ears! @@ -296,11 +296,11 @@ If you're just getting started, take a look at [our new docs and concepts page]( If you have discovered a 🐜 or have a feature suggestion, feel free to create an issue on GitHub. -

Current project members

+## Current project members For information about the governance of the webpack project, see [GOVERNANCE.md](./GOVERNANCE.md). -

TSC (Technical Steering Committee)

+### TSC (Technical Steering Committee) - [alexander-akait](https://github.com/alexander-akait) - **Alexander Akait** <> (he/him) @@ -313,11 +313,11 @@ For information about the governance of the webpack project, see [GOVERNANCE.md] - [thelarkinn](https://github.com/thelarkinn) - **Sean Larkin** <> (he/him) -

Maintenance

+### Maintenance This webpack repository is maintained by the [`Core Working Group`](./WORKING_GROUP.md). -

Sponsoring

+## Sponsoring Most of the core team members, webpack contributors and contributors in the ecosystem do this open source work in their free time. If you use webpack for a serious task, and you'd like us to invest more time on it, please donate. This project increases your income/productivity too. It makes development and applications faster and it reduces the required bandwidth. @@ -330,7 +330,7 @@ This is how we use the donations: - Infrastructure cost - Fees for money handling -

Premium Partners

+### Premium Partners
@@ -339,7 +339,7 @@ This is how we use the donations:
-

Other Backers and Sponsors

+### Other Backers and Sponsors Before we started using OpenCollective, donations were made anonymously. Now that we have made the switch, we would like to acknowledge these sponsors (and the ones who continue to donate using OpenCollective). If we've missed someone, please send us a PR, and we'll add you to this list. @@ -351,7 +351,7 @@ Before we started using OpenCollective, donations were made anonymously. Now tha -

Gold Sponsors

+### Gold Sponsors [Become a gold sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on GitHub with a link to your site. @@ -390,7 +390,7 @@ Before we started using OpenCollective, donations were made anonymously. Now tha -

Silver Sponsors

+### Silver Sponsors [Become a silver sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on GitHub with a link to your site. @@ -429,7 +429,7 @@ Before we started using OpenCollective, donations were made anonymously. Now tha -

Bronze Sponsors

+### Bronze Sponsors [Become a bronze sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on GitHub with a link to your site. @@ -539,7 +539,7 @@ Before we started using OpenCollective, donations were made anonymously. Now tha -

Backers

+### Backers [Become a backer](https://opencollective.com/webpack#backer) and get your image on our README on GitHub with a link to your site. @@ -645,7 +645,8 @@ Before we started using OpenCollective, donations were made anonymously. Now tha -

Special Thanks to

+## Special Thanks to +

(In chronological order)

- [@google](https://github.com/google) for [Google Web Toolkit (GWT)](http://www.gwtproject.org/), which aims to compile Java to JavaScript. It features a similar [Code Splitting](http://www.gwtproject.org/doc/latest/DevGuideCodeSplitting.html) as webpack. diff --git a/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_CODE_OF_CONDUCT_06e7b335922db99b918d.md b/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_CODE_OF_CONDUCT_06e7b335922db99b918d.md index 4faf227c4..8b9370843 100644 --- a/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_CODE_OF_CONDUCT_06e7b335922db99b918d.md +++ b/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_CODE_OF_CONDUCT_06e7b335922db99b918d.md @@ -1 +1 @@ -[Code of Conduct](https://github.com/openjs-foundation/code-and-learn/blob/master/CODE_OF_CONDUCT.md) +[Code of Conduct](https://github.com/openjs-foundation/code-and-learn/blob/master/README.md) diff --git a/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md b/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md new file mode 100644 index 000000000..a210a6db9 --- /dev/null +++ b/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md @@ -0,0 +1,673 @@ +
+ + + +
+
+ +[![npm][npm]][npm-url] + +[![node][node]][node-url] +[![builds1][builds1]][builds1-url] +[![dependency-review][dependency-review]][dependency-review-url] +[![coverage][cover]][cover-url] +[![PR's welcome][prs]][prs-url] +[![compatibility-score](https://api.dependabot.com/badges/compatibility_score?dependency-name=webpack&package-manager=npm_and_yarn&previous-version=5.72.1&new-version=5.73.0)](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates#about-compatibility-scores) +[![downloads](https://img.shields.io/npm/dm/webpack.svg)](https://npmcharts.com/compare/webpack?minimal=true) +[![install-size](https://packagephobia.com/badge?p=webpack)](https://packagephobia.com/result?p=webpack) +[![backers](https://opencollective.com/webpack/backers/badge.svg)](https://opencollective.com/webpack#backer) +[![sponsors](https://opencollective.com/webpack/sponsors/badge.svg)](https://opencollective.com/webpack#sponsors) +[![contributors](https://img.shields.io/github/contributors/webpack/webpack.svg)](https://github.com/webpack/webpack/graphs/contributors) +[![discussions](https://img.shields.io/github/discussions/webpack/webpack)](https://github.com/webpack/webpack/discussions) +[![discord](https://img.shields.io/discord/1180618526436888586?label=discord&logo=discord&logoColor=white&style=flat)](https://discord.gg/5sxFZPdx2k) +[![LFX Health Score](https://insights.linuxfoundation.org/api/badge/health-score?project=webpack)](https://insights.linuxfoundation.org/project/webpack) + +

webpack

+

+ Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. +

+
+ +## Table of Contents + +- [Install](#install) +- [Introduction](#introduction) +- [Concepts](#concepts) +- [Contributing](#contributing) +- [Support](#support) +- [Current project members](#current-project-members) + - [TSC (Technical Steering Committee)](#tsc-technical-steering-committee) + - [Core Collaborators](#core-collaborators) +- [Sponsoring](#sponsoring) + - [Premium Partners](#premium-partners) + - [Gold Sponsors](#gold-sponsors) + - [Silver Sponsors](#silver-sponsors) + - [Bronze Sponsors](#bronze-sponsors) + - [Backers](#backers) +- [Special Thanks](#special-thanks-to) + +

Install

+ +Install with npm: + +```bash +npm install --save-dev webpack +``` + +Install with yarn: + +```bash +yarn add webpack --dev +``` + +

Introduction

+ +Webpack is a bundler for modules. The main purpose is to bundle JavaScript +files for usage in a browser, yet it is also capable of transforming, bundling, +or packaging just about any resource or asset. + +**TL;DR** + +- Bundles [ES Modules](https://www.2ality.com/2014/09/es6-modules-final.html), [CommonJS](http://wiki.commonjs.org/), and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined). +- Can create a single bundle or multiple chunks that are asynchronously loaded at runtime (to reduce initial loading time). +- Dependencies are resolved during compilation, reducing the runtime size. +- Loaders can preprocess files while compiling, e.g. TypeScript to JavaScript, Handlebars strings to compiled functions, images to Base64, etc. +- Highly modular plugin system to do whatever else your application requires. + +#### Learn about webpack through videos! + +- [Understanding Webpack - Video 1](https://www.youtube.com/watch?v=xj93pvQIsRo) +- [Understanding Webpack - Video 2](https://www.youtube.com/watch?v=4tQiJaFzuJ8) + +### Get Started + +Check out webpack's quick [**Get Started**](https://webpack.js.org/guides/getting-started) guide and the [other guides](https://webpack.js.org/guides/). + +### Browser Compatibility + +Webpack supports all browsers that are [ES5-compliant](https://kangax.github.io/compat-table/es5/) (IE8 and below are not supported). +Webpack also needs `Promise` for `import()` and `require.ensure()`. If you want to support older browsers, you will need to [load a polyfill](https://webpack.js.org/guides/shimming/) before using these expressions. + +

Concepts

+ +### [Plugins](https://webpack.js.org/plugins/) + +Webpack has a [rich plugin +interface](https://webpack.js.org/plugins/). Most of the features +within webpack itself use this plugin interface. This makes webpack very +**flexible**. + +| Name | Status | Install Size | Description | +| :---------------------------------------: | :----------------: | :-----------------: | :-------------------------------------------------------------------------------------- | +| [mini-css-extract-plugin][mini-css] | ![mini-css-npm] | ![mini-css-size] | Extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. | +| [compression-webpack-plugin][compression] | ![compression-npm] | ![compression-size] | Prepares compressed versions of assets to serve them with Content-Encoding | +| [html-bundler-webpack-plugin][bundler] | ![bundler-npm] | ![bundler-size] | Renders a template (EJS, Handlebars, Pug) with referenced source asset files into HTML. | +| [html-webpack-plugin][html-plugin] | ![html-plugin-npm] | ![html-plugin-size] | Simplifies creation of HTML files (`index.html`) to serve your bundles | +| [pug-plugin][pug-plugin] | ![pug-plugin-npm] | ![pug-plugin-size] | Renders Pug files to HTML, extracts JS and CSS from sources specified directly in Pug. | + +[common-npm]: https://img.shields.io/npm/v/webpack.svg +[mini-css]: https://github.com/webpack-contrib/mini-css-extract-plugin +[mini-css-npm]: https://img.shields.io/npm/v/mini-css-extract-plugin.svg +[mini-css-size]: https://packagephobia.com/badge?p=mini-css-extract-plugin +[component]: https://github.com/webpack-contrib/component-webpack-plugin +[component-npm]: https://img.shields.io/npm/v/component-webpack-plugin.svg +[component-size]: https://packagephobia.com/badge?p=component-webpack-plugin +[compression]: https://github.com/webpack-contrib/compression-webpack-plugin +[compression-npm]: https://img.shields.io/npm/v/compression-webpack-plugin.svg +[compression-size]: https://packagephobia.com/badge?p=compression-webpack-plugin +[bundler]: https://github.com/webdiscus/html-bundler-webpack-plugin +[bundler-npm]: https://img.shields.io/npm/v/html-bundler-webpack-plugin.svg +[bundler-size]: https://packagephobia.com/badge?p=html-bundler-webpack-plugin +[html-plugin]: https://github.com/jantimon/html-webpack-plugin +[html-plugin-npm]: https://img.shields.io/npm/v/html-webpack-plugin.svg +[html-plugin-size]: https://packagephobia.com/badge?p=html-webpack-plugin +[pug-plugin]: https://github.com/webdiscus/pug-plugin +[pug-plugin-npm]: https://img.shields.io/npm/v/pug-plugin.svg +[pug-plugin-size]: https://packagephobia.com/badge?p=pug-plugin + +### [Loaders](https://webpack.js.org/loaders/) + +Webpack enables the use of loaders to preprocess files. This allows you to bundle +**any static resource** way beyond JavaScript. You can easily [write your own +loaders](https://webpack.js.org/api/loaders/) using Node.js. + +Loaders are activated by using `loadername!` prefixes in `require()` statements, +or are automatically applied via regex from your webpack configuration. + +#### JSON + +| Name | Status | Install Size | Description | +| :---------------------------------------------------------------------------------------------------------------------------------------: | :---------: | :----------: | :------------------------------: | +| | ![cson-npm] | ![cson-size] | Loads and transpiles a CSON file | + +[cson-npm]: https://img.shields.io/npm/v/cson-loader.svg +[cson-size]: https://packagephobia.com/badge?p=cson-loader + +#### Transpiling + +| Name | Status | Install Size | Description | +| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------: | :------------: | :------------------------------------------------------------------------------------------------ | +| | ![babel-npm] | ![babel-size] | Loads ES2015+ code and transpiles to ES5 using Babel | +| | ![type-npm] | ![type-size] | Loads TypeScript like JavaScript | +| | ![coffee-npm] | ![coffee-size] | Loads CoffeeScript like JavaScript | + +[babel-npm]: https://img.shields.io/npm/v/babel-loader.svg +[babel-size]: https://packagephobia.com/badge?p=babel-loader +[coffee-npm]: https://img.shields.io/npm/v/coffee-loader.svg +[coffee-size]: https://packagephobia.com/badge?p=coffee-loader +[type-npm]: https://img.shields.io/npm/v/ts-loader.svg +[type-size]: https://packagephobia.com/badge?p=ts-loader + +#### Templating + +| Name | Status | Install Size | Description | +| :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------: | :--------------: | :-------------------------------------------------------------------------------------- | +| | ![html-npm] | ![html-size] | Exports HTML as string, requires references to static resources | +| | ![pug-npm] | ![pug-size] | Loads Pug templates and returns a function | +| | ![pug3-npm] | ![pug3-size] | Compiles Pug to a function or HTML string, useful for use with Vue, React, Angular | +| | ![md-npm] | ![md-size] | Compiles Markdown to HTML | +| | ![posthtml-npm] | ![posthtml-size] | Loads and transforms a HTML file using [PostHTML](https://github.com/posthtml/posthtml) | +| | ![hbs-npm] | ![hbs-size] | Compiles Handlebars to HTML | + +[html-npm]: https://img.shields.io/npm/v/html-loader.svg +[html-size]: https://packagephobia.com/badge?p=html-loader +[pug-npm]: https://img.shields.io/npm/v/pug-loader.svg +[pug-size]: https://packagephobia.com/badge?p=pug-loader +[pug3-npm]: https://img.shields.io/npm/v/@webdiscus/pug-loader.svg +[pug3-size]: https://packagephobia.com/badge?p=@webdiscus/pug-loader +[jade-npm]: https://img.shields.io/npm/v/jade-loader.svg +[jade-size]: https://packagephobia.com/badge?p=jade-loader +[md-npm]: https://img.shields.io/npm/v/markdown-loader.svg +[md-size]: https://packagephobia.com/badge?p=markdown-loader +[posthtml-npm]: https://img.shields.io/npm/v/posthtml-loader.svg +[posthtml-size]: https://packagephobia.com/badge?p=posthtml-loader +[hbs-npm]: https://img.shields.io/npm/v/handlebars-loader.svg +[hbs-size]: https://packagephobia.com/badge?p=handlebars-loader + +#### Styling + +| Name | Status | Install Size | Description | +| :-------------------------------------------------------------------------------------------------------------------------------------------: | :------------: | :-------------: | :----------------------------------------------------------------------- | +| `