{"id":13671331,"url":"https://github.com/huruji/eruda-webpack-plugin","last_synced_at":"2025-10-27T20:31:08.334Z","repository":{"id":34003022,"uuid":"165407571","full_name":"huruji/eruda-webpack-plugin","owner":"huruji","description":"A webpack plugin of eruda to help you develop mobile app","archived":false,"fork":false,"pushed_at":"2023-06-04T01:46:29.000Z","size":282,"stargazers_count":62,"open_issues_count":8,"forks_count":20,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-09-28T22:06:58.844Z","etag":null,"topics":["debug","debugging-tools","eruda","webpack","webpack-plugin","webpack3","webpack4"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/huruji.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2019-01-12T16:10:16.000Z","updated_at":"2024-09-20T18:32:46.000Z","dependencies_parsed_at":"2024-01-14T17:03:33.429Z","dependency_job_id":"dfe77ab2-5b4c-4cb4-bdb4-d83bc344ecd5","html_url":"https://github.com/huruji/eruda-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huruji%2Feruda-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huruji%2Feruda-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huruji%2Feruda-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huruji%2Feruda-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huruji","download_url":"https://codeload.github.com/huruji/eruda-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219860681,"owners_count":16556013,"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":["debug","debugging-tools","eruda","webpack","webpack-plugin","webpack3","webpack4"],"created_at":"2024-08-02T09:01:06.447Z","updated_at":"2025-10-27T20:31:07.862Z","avatar_url":"https://github.com/huruji.png","language":"JavaScript","readme":"English | [中文](./README_CN.md)\n[![NPM](https://nodei.co/npm/eruda-webpack-plugin.png)](https://npmjs.org/package/eruda-webpack-plugin)\n\n# eruda-webpack-plugin\nA webpack plugin of [eruda](https://github.com/liriliri/eruda) to help you develop mobile app\n\n\n## How to use\n\n```js\nnpm i --save-dev eruda-webpack-plugin\n```\n\n```js\n// webpack.config.js\nconst ErudaWebpackPlugin = require('eruda-webpack-plugin')\nconst HtmlWebpackPlugin = require('html-webpack-plugin')\n\nconst config = {\n  devServer: {\n        contentBase: path.join(__dirname, 'dist'),\n        port: 1000\n  },\n  mode: \"development\",\n  plugins: [\n    new HtmlWebpackPlugin({\n      template: path.resolve(__dirname, 'index.html')\n    }),\n    new ErudaWebpackPlugin({\n      entry: /index\\.js$/\n    })\n  ]\n}\n```\n\nOpen `http://localhost:1000` in your browser, you can use `eruda` to debug your mobile app\n\n\u003cimg  width=\"350\" align=\"center\" src=\"./screenshot.png\" /\u003e\n\n## Using eruda's plugin\n\n```js\nnew ErudaWebpackPlugin({\n  plugins: ['fps', 'timing']\n})\n```\n\n## Options\n\n### injectOnlyOnce (make sure your npm package version \u003e `1.5.0`)\n\nEnsure `eruda` and it's plugins will be injected only once. You can drink a cup of coffe instead of write the regex of `entry` option.\n\n**Default value: `true`**\n\n```js\nnew ErudaWebpackPlugin({\n  injectOnlyOnce: true\n})\n```\n### force\n\n`eruda-webpack-plugin` only works in `development` mode, if you need it in other modes, you can set `force` as `true`\n\n**Default value: `false`**\n\n```js\nnew ErudaWebpackPlugin({\n  force: true\n})\n```\n\n### tool\n\nChoose which eruda's tools you want, by default all will be added.\n\n```js\nnew ErudaWebpackPlugin({\n  tool: ['console', 'elements']\n})\n```\n\n### plugins\n\nadd eruda's plugin\n\n```js\nnew ErudaWebpackPlugin({\n  plugins: ['fps', 'timing']\n})\n```\n\n### entry\n\nthe assets which should inject `eruda` instance\n\nall `.js` assets will be injected by default\n\n```js\nnew ErudaWebpackPlugin({\n  entry: [/index\\.js$/, /page1\\.js$/]\n})\n```\n\n### filters\n\nthe assets which don't need inject `eruda` instance\n\nthis option is contrary to `entry`\n\n```js\nnew ErudaWebpackPlugin({\n  filters: [/subpage\\.js$/]\n})\n```\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuruji%2Feruda-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuruji%2Feruda-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuruji%2Feruda-webpack-plugin/lists"}