{"id":18106720,"url":"https://github.com/khujamovcodes/webpack","last_synced_at":"2026-02-25T06:04:34.699Z","repository":{"id":254719650,"uuid":"847352423","full_name":"KhujamovCodes/Webpack","owner":"KhujamovCodes","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-28T05:10:28.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T23:38:10.632Z","etag":null,"topics":["webpack","webpack2","webpack4","webpack5"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KhujamovCodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-25T15:29:09.000Z","updated_at":"2024-10-23T22:10:06.000Z","dependencies_parsed_at":"2024-08-25T16:46:37.091Z","dependency_job_id":"2360e0d8-88ee-4e35-ac1f-84919d533462","html_url":"https://github.com/KhujamovCodes/Webpack","commit_stats":null,"previous_names":["khujamovcodes/webpack","ixvadev/webpack"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhujamovCodes%2FWebpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhujamovCodes%2FWebpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhujamovCodes%2FWebpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhujamovCodes%2FWebpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KhujamovCodes","download_url":"https://codeload.github.com/KhujamovCodes/Webpack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246190450,"owners_count":20738031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["webpack","webpack2","webpack4","webpack5"],"created_at":"2024-10-31T23:07:50.065Z","updated_at":"2025-10-26T20:04:08.533Z","avatar_url":"https://github.com/KhujamovCodes.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg class=\"logo\" src=\"https://webpack.js.org/site-logo.c0e60df418e04f58.svg\" alt=\"webpack logo\" width=\"300\" height=\"200\"\u003e\n\n# Webpack haqida to'liq ma'lumot\n\n## Webpack nima?\n**Webpack** - bu ochiq kodli modul to'plovchi (bundler) bo'lib, asosan JavaScript ilovalarini yig'ish uchun ishlatiladi. Webpack kodni kichik modullarga bo'lib, ularni yagona to'plamga (bundle) birlashtirish imkonini beradi. Bu jarayon sizning ilovangizni optimallashtiradi va yuklash vaqtini qisqartiradi.\n\n## Webpack qanday ishlaydi?\nWebpack barcha kirish (entry) nuqtalarini belgilab, barcha bog'langan fayllarni (JS, CSS, tasvirlar va boshqalar) analiz qiladi. Har bir faylni o'zining modul tizimiga o'rab, bir yoki bir nechta chiqish (output) fayllariga yig'adi. Ushbu chiqish fayllar brauzer tomonidan ishlatiladi.\n\n## Asosiy tushunchalar\n\n### 1. Entry (Kirish nuqtasi)\nEntry nuqtasi - bu Webpack'ning yig'ishni boshlaydigan fayli. Odatda, bu ilovaning bosh fayli hisoblanadi.\n\n    module.exports = {\n      entry: './src/index.js',\n    };\n\n### 2. Output (Chiqish)\nOutput - bu Webpack tomonidan yaratilgan to'plamning qayerga yozilishini belgilaydi. Odatda dist katalogiga yoziladi.\n\n    module.exports = {\n      entry: './src/index.js',\n      output: {\n        filename: 'bundle.js',\n        path: path.resolve(__dirname, 'dist'),\n      },\n    };\n### 3. Loaders (Yuklovchilar)\nLoaders Webpack'ga JavaScript bo'lmagan fayllarni (masalan, CSS, tasvirlar) ishlash imkonini beradi. Ular fayllarni o'zgartirib, ularni Webpack'ning modul tizimiga kiritadi.\n\n    module.exports = {\n      module: {\n        rules: [\n          {\n            test: /\\.css$/,\n            use: ['style-loader', 'css-loader'],\n          },\n        ],\n      },\n    };\n\n\n### 4. Plugins (Plaginlar)\nPlaginlar Webpack'ning imkoniyatlarini kengaytiradi va yig'ish jarayonining turli bosqichlarida qo'shimcha vazifalarni bajaradi. Masalan, fayllarni minifikatsiya qilish yoki o'zgarishlarni avtomatik aniqlash (HMR).\n\n    const HtmlWebpackPlugin = require('html-webpack-plugin');\n    module.exports = {\n      plugins: [\n        new HtmlWebpackPlugin({\n          template: './src/index.html',\n        }),\n      ],\n    };\n\n### 5. Mode (Rejim)\nWebpack ikkita asosiy rejimga ega: development va production. Har bir rejim ma'lum konfiguratsiyalarga ega, masalan, production rejimi optimallashtirishni o'z ichiga oladi.\n    \n    module.exports = {\n      mode: 'development',\n    };\n\n### Webpack konfiguratsiyasi\nWebpack odatda webpack.config.js fayli orqali konfiguratsiya qilinadi. Bu fayl Webpack'ga qanday kirish nuqtalarini ishlatish, qanday yuklovchilar va plaginlar qo'llash kerakligini aytadi.\n\n    const path = require('path');\n    const HtmlWebpackPlugin = require('html-webpack-plugin');\n    \n    module.exports = {\n      mode: 'development',\n      entry: './src/index.js',\n      output: {\n        filename: 'bundle.js',\n        path: path.resolve(__dirname, 'dist'),\n      },\n      module: {\n        rules: [\n          {\n            test: /\\.css$/,\n            use: ['style-loader', 'css-loader'],\n          },\n        ],\n      },\n      plugins: [\n        new HtmlWebpackPlugin({\n          template: './src/index.html',\n        }),\n      ],\n    };\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhujamovcodes%2Fwebpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhujamovcodes%2Fwebpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhujamovcodes%2Fwebpack/lists"}