{"id":26684225,"url":"https://github.com/johnapache/koa-webpack-middleware","last_synced_at":"2025-03-26T09:19:22.969Z","repository":{"id":35162592,"uuid":"214966044","full_name":"JohnApache/koa-webpack-middleware","owner":"JohnApache","description":"提供 了 koa版本的webpack 开发 插件, webpack-dev-middleware 和 webpack-hot-middleware等，同时支持ts版本","archived":false,"fork":false,"pushed_at":"2022-12-04T16:03:05.000Z","size":144,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T06:02:59.468Z","etag":null,"topics":["koa-webpack-dev-middleware","koa-webpack-hot-middleware","koa-webpack-middleware","webpack-dev-middleware","webpack-hot-middleware"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JohnApache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-14T06:35:44.000Z","updated_at":"2019-10-15T07:05:16.000Z","dependencies_parsed_at":"2023-01-15T15:15:18.376Z","dependency_job_id":null,"html_url":"https://github.com/JohnApache/koa-webpack-middleware","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnApache%2Fkoa-webpack-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnApache%2Fkoa-webpack-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnApache%2Fkoa-webpack-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnApache%2Fkoa-webpack-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnApache","download_url":"https://codeload.github.com/JohnApache/koa-webpack-middleware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245623077,"owners_count":20645681,"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":["koa-webpack-dev-middleware","koa-webpack-hot-middleware","koa-webpack-middleware","webpack-dev-middleware","webpack-hot-middleware"],"created_at":"2025-03-26T09:19:22.519Z","updated_at":"2025-03-26T09:19:22.959Z","avatar_url":"https://github.com/JohnApache.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koa-webpack-middleware\n提供了Koa版本的webpack 开发插件, webpack-dev-middleware 和 webpack-hot-middleware等，同时支持ts\n\n## 使用方式\n```js\nconst Koa = require('koa');\nconst webpack = require('webpack');\nconst webpackConfig = require('./webpack.config');\nconst {koaWebpackDevMiddleware, koaWebpackHotMiddleware} = require('../dist/koa-webpack-middleware');\nconst app = new Koa();\nconst compiler = webpack(webpackConfig);\n\napp.use(koaWebpackDevMiddleware(compiler, {\n    host: 'localhost',\n    contentBase: './dist',\n    log: false,\n    stats: {\n        colors: true,\n        process: true\n    }\n}))\n\napp.use(koaWebpackHotMiddleware(compiler, {\n    log: false,\n    path: \"/__webpack_hmr\",\n    heartbeat: 2000,\n}))\n\napp.listen(9999, () =\u003e {\n    console.log('server is running on port: 9999');\n})\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnapache%2Fkoa-webpack-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnapache%2Fkoa-webpack-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnapache%2Fkoa-webpack-middleware/lists"}