{"id":14976560,"url":"https://github.com/easy-team/webpack-tool","last_synced_at":"2025-10-27T20:32:13.788Z","repository":{"id":22023322,"uuid":"94746014","full_name":"easy-team/webpack-tool","owner":"easy-team","description":"Webpack Build Tool, Support Webpack Build Ui View.","archived":false,"fork":false,"pushed_at":"2023-03-14T15:06:22.000Z","size":705,"stargazers_count":13,"open_issues_count":17,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-08T21:43:50.473Z","etag":null,"topics":["webpack","webpack-dev-server","webpack-hot-middleware","webpack3","webpack4"],"latest_commit_sha":null,"homepage":"https://easyjs.cn","language":"JavaScript","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/easy-team.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2017-06-19T06:57:37.000Z","updated_at":"2024-08-02T12:05:05.000Z","dependencies_parsed_at":"2024-06-18T18:51:30.491Z","dependency_job_id":null,"html_url":"https://github.com/easy-team/webpack-tool","commit_stats":{"total_commits":101,"total_committers":2,"mean_commits":50.5,"dds":0.4455445544554455,"last_synced_commit":"c0f0de71aedb830de6028dfe35e2b3522b2fde00"},"previous_names":["hubcarl/webpack-tool"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easy-team%2Fwebpack-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easy-team%2Fwebpack-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easy-team%2Fwebpack-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easy-team%2Fwebpack-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/easy-team","download_url":"https://codeload.github.com/easy-team/webpack-tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238553305,"owners_count":19491405,"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","webpack-dev-server","webpack-hot-middleware","webpack3","webpack4"],"created_at":"2024-09-24T13:54:04.263Z","updated_at":"2025-10-27T20:32:08.437Z","avatar_url":"https://github.com/easy-team.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-tool\n\nKoa Webpack Dev Server:\n\n- development mode, start webpack koa server, file memory, hot update.\n\n- production mode, webpack build file to disk.\n\n## Version\n\n- webpack 5: webpack-tool: 5.x.x\n- webpack 4: webpack-tool: 4.x.x\n- webpack 3: webpack-tool: 3.x.x\n\n## Install\n\n```bash\n$ npm i webpack-tool --save\n```\n\n## Usage\n\n```js\n//build/index.js\nconst WebpackTool = require('webpack-tool');\nconst NODE_ENV = process.env.VIEW;\n\nconst webpackTool = new WebpackTool({\n  devServer: {\n    before: before =\u003e {\n      // register koa middleware\n    },\n    after: app =\u003e {\n      // register koa middleware\n    },\n    proxy: {\n      '/api': {\n        target: 'http://localhost:3000',\n        pathRewrite: {'^/api' : ''}\n      }\n    },\n    historyApiFallback: {\n      index: '/app.html'\n    }\n  }\n});\n\nconst webpackConfig = {\n  entry:{\n    index: './src/index.js'\n  },\n  module:{\n    rules:[]\n  }\n  plugins: []\n};\n\nif (NODE_ENV === 'development') {\n  // start webpack build and show build result ui view\n  webpackTool.server(webpackConfig);\n} else {\n  // if you want to show build result ui view for build mode, please set  process.env.BUILD_VIEW=true\n  webpackTool.build(webpackConfig);\n}\n```\n\n## Configuration\n\n`config.devServer` support follow option:\n\n- `proxy` {Object} see https://webpack.docschina.org/configuration/dev-server/#devserver-proxy\n\n- `historyApiFallback` {Object} see https://webpack.docschina.org/configuration/dev-server/#devserver-historyapifallback\n\n- `before` {Function} see https://webpack.docschina.org/configuration/dev-server/#devserver-before\n\n- `after` {Function} see https://webpack.docschina.org/configuration/dev-server/#devserver-after\n\n## Run\n\n```js\n\"scripts\": {\n  \"start\": \"cross-env node build\"\n }\n```\n\n```bash\nnpm start\n```\n\nStart Webpack Debug Server: http://127.0.0.1:8888/debug\n\n![UI-VIEW](https://github.com/hubcarl/webpack-tool/blob/master/doc/webpack-tool-ui-view.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasy-team%2Fwebpack-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasy-team%2Fwebpack-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasy-team%2Fwebpack-tool/lists"}