Webpack plugin to solve the problem of generating js file for manifest.json entry
npm install wext-manifest-webpack-pluginWebpack plugin to solve the problem of generating js file for manifest.json entry
❤️ it? ⭐️ it on GitHub or Tweet about it.
- How it works
- Installation
- Usage
- Issues
- 🐛 Bugs
- Linting & TypeScript Config
- LICENSE
It just find js files from manifest entry and remove the js file from the compilation.
Checkout web-extension-starter that uses this plugin
``shnpm
npm install --save-dev wext-manifest-webpack-plugin
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
label._
$3
Please file an issue here for bugs, missing documentation, or unexpected behavior.
Linting & TypeScript Config
@abhijithvijayan/eslint-config
- Shared TypeScript Configuration - @abhijithvijayan/tsconfig`MIT © Abhijith Vijayan