Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhijithvijayan/wext-manifest-webpack-plugin
Webpack plugin to solve the problem of generating js file for manifest.json entry
https://github.com/abhijithvijayan/wext-manifest-webpack-plugin
plugin webpack wext-manifest
Last synced: 8 days ago
JSON representation
Webpack plugin to solve the problem of generating js file for manifest.json entry
- Host: GitHub
- URL: https://github.com/abhijithvijayan/wext-manifest-webpack-plugin
- Owner: abhijithvijayan
- License: mit
- Created: 2020-04-01T15:05:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-08T15:06:25.000Z (7 months ago)
- Last Synced: 2024-10-11T20:32:42.576Z (30 days ago)
- Topics: plugin, webpack, wext-manifest
- Language: TypeScript
- Homepage: https://github.com/abhijithvijayan/wext-manifest-loader
- Size: 28.3 KB
- Stars: 4
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license
Awesome Lists containing this project
README
wext-manifest-webpack-plugin
Webpack plugin to solve the problem of generating js file for manifest.json entry
🙋♂️ Made by @abhijithvijayan
❤️ it? ⭐️ it on [GitHub](https://github.com/abhijithvijayan/wext-manifest-webpack-plugin/stargazers) or [Tweet](https://twitter.com/intent/tweet?text=Check%20out%20wext-manifest-webpack-plugin%21%20by%20%40_abhijithv%0A%0AWebpack%20plugin%20to%20solve%20the%20problem%20of%20generating%20js%20file%20for%20manifest.json%20entry%0Ahttps%3A%2F%2Fgithub.com%2Fabhijithvijayan%2Fwext-manifest-webpack-plugin%0A%0A%23webpack%20%23manifest%20%23webextension%20%23plugin) about it.
## Table of Contents
- [How it works](#how-it-works)
- [Installation](#installation)
- [Usage](#usage)
- [Issues](#issues)
- [🐛 Bugs](#-bugs)
- [Linting & TypeScript Config](#linting-&-typescript-config)
- [LICENSE](#license)## How it works
It just find js files from manifest entry and remove the js file from the compilation.
### Looking for Web Extension starter
Checkout [web-extension-starter](https://github.com/abhijithvijayan/web-extension-starter) that uses this plugin
## Installation
```sh
# npm
npm install --save-dev wext-manifest-webpack-plugin# yarn
yarn add wext-manifest-webpack-plugin --dev
```Version `1.4.0` adds support for webpack 5. Backward compatible with webpack 4 as well.
## Usage
```js
// ... other plugins
const WextManifestWebpackPlugin = require("wext-manifest-webpack-plugin");module.exports = {
entry: {
manifest: './source/manifest.json',
// ...
},output: {
path: path.join(destPath, targetBrowser),
filename: 'js/[name].js',
},module: {
rules: [
{
type: 'javascript/auto', // prevent webpack handling json with its own loaders,
test: /manifest\.json$/,
use: 'wext-manifest-loader',
exclude: /node_modules/,
},
]
},plugins: [
new WextManifestWebpackPlugin(),
// ...
],
};
```## Issues
_Looking to contribute? Look for the [Good First Issue](https://github.com/abhijithvijayan/wext-manifest-webpack-plugin/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22)
label._### 🐛 Bugs
Please file an issue [here](https://github.com/abhijithvijayan/wext-manifest-webpack-plugin/issues/new) for bugs, missing documentation, or unexpected behavior.
[**See Bugs**](https://github.com/abhijithvijayan/wext-manifest-webpack-plugin/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22type%3A+bug%22)
## Linting & TypeScript Config
- Shared Eslint & Prettier Configuration - [`@abhijithvijayan/eslint-config`](https://www.npmjs.com/package/@abhijithvijayan/eslint-config)
- Shared TypeScript Configuration - [`@abhijithvijayan/tsconfig`](https://www.npmjs.com/package/@abhijithvijayan/tsconfig)## License
MIT © [Abhijith Vijayan](https://abhijithvijayan.in)