{"id":21707735,"url":"https://github.com/aminoffz/webpack-browser-extension-template","last_synced_at":"2026-04-05T22:05:29.618Z","repository":{"id":132610897,"uuid":"611949737","full_name":"AminoffZ/webpack-browser-extension-template","owner":"AminoffZ","description":"A quickstart repository with structure and boilerplate for optimized extension development.","archived":false,"fork":false,"pushed_at":"2023-09-21T13:19:16.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T16:11:38.372Z","etag":null,"topics":["browser-extension","typescript","webpack"],"latest_commit_sha":null,"homepage":"","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/AminoffZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-03-09T21:59:39.000Z","updated_at":"2023-03-09T22:53:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc808dd8-833e-4642-b88a-2959101d8ebb","html_url":"https://github.com/AminoffZ/webpack-browser-extension-template","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/AminoffZ%2Fwebpack-browser-extension-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AminoffZ%2Fwebpack-browser-extension-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AminoffZ%2Fwebpack-browser-extension-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AminoffZ%2Fwebpack-browser-extension-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AminoffZ","download_url":"https://codeload.github.com/AminoffZ/webpack-browser-extension-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244656993,"owners_count":20488696,"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":["browser-extension","typescript","webpack"],"created_at":"2024-11-25T22:19:04.435Z","updated_at":"2025-12-31T00:05:09.126Z","avatar_url":"https://github.com/AminoffZ.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cimg src=\"https://raw.githubusercontent.com/AminoffZ/webpack-browser-extension-template/main/public/images/icon256.png\" align=\"right\" width=\"128\" title=\"hover text\"\u003e\n\n# Browser extension template with webpack \n\nQuickstart your extension development by using this repository!\n\n## Features\n- Typescript for type safe development\n- Webpack for significant size reduction\n- Manifest version 3 for faster publishing on Chrome\n\n## Develop\n\n### Setup\n\nClone the project, navigate into folder using terminal and run:\n`npm install`\n\n### Adding behaviour\n\n#### 0. Before starting\n\nMake sure you have some understanding of extension development. Here are some resources:\n- [Chrome](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/)\n- [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension)\n\n#### 1. Manifest\n\nChatGPT: In extension development, the manifest is a JSON file that defines the extension's name, version, functionality, permissions, and other details. It is required for all browser extensions and must be carefully constructed to ensure the extension is secure and efficient.\n\nFor additional information visit the [Chrome](https://developer.chrome.com/docs/extensions/mv3/manifest/) manifest documentation page. Please note that some browsers, like [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings), require specific information for extensions to work.\n\n#### 2. JavaScript\n\nTo add/modify code, modify the files in the _src/scripts/_ folder. They will be compiled to JavaScript when you build the extension. Look at **Build** for more information.\n\n#### What is a _content.ts_/_script.ts_?\n\nChatGPT: In extension development, a content script is a JavaScript file that runs in the context of a web page and can modify its content and behavior. The content script can read and modify the HTML, CSS, and JavaScript of the web page, and can be used to add new functionality, modify existing functionality, or manipulate the content of the page in various ways.\n\nThe name \"content.js\" is often used as a convention to indicate that the file contains the code for a content script. However, developers are free to use any filename they like for their content script.\n\nOn the other hand, \"script.js\" is a generic name that could be used for any JavaScript file used in an extension, including background scripts, popup scripts, options page scripts, or any other script file that the extension may use.\n\nIn summary, \"content.js\" specifically refers to the file that contains the code for a content script, while \"script.js\" is a more generic name that could refer to any JavaScript file used in an extension.\n\n#### 3. CSS\n\nTo add CSS, create or modify files in the _public/styles/_ folder and make sure they are referenced in the manifest.\n\n#### 4. HTML\n\nHTML can be added [programmatically](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement) using JavaScript.\n\n#### 5. Changing the icon\n\n_public/images/icon256.png_\n\n#### 6. Testing your extension\n\nThankfully you don't have to get your extension published before being able to test it. Refer to **0. Before starting** for information about testing an extension, also referred to as loading unpacked extensions. You do however need to build the extension to be able to test it, refer to the next section for this step.\n\n## Build\n\nTo build the extension, run:\n`npm run build`  \nThe files that end up in the build folder _dist/_ are configured in _webpack/webpack.config.js_. This folder is your unpacked extension.\n\n# License\n\nMIT License\n\nCopyright (c) 2023 AminoffZ\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faminoffz%2Fwebpack-browser-extension-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faminoffz%2Fwebpack-browser-extension-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faminoffz%2Fwebpack-browser-extension-template/lists"}