Gathering detailed insights and metrics for wext-manifest-loader
Gathering detailed insights and metrics for wext-manifest-loader
Gathering detailed insights and metrics for wext-manifest-loader
Gathering detailed insights and metrics for wext-manifest-loader
Webextension Manifest Generator that you specify `manifest.json` properties to appear only in specific browsers and environment
npm install wext-manifest-loader
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (74.59%)
JavaScript (25.41%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
27 Stars
117 Commits
4 Forks
3 Watchers
2 Branches
4 Contributors
Updated on Jun 23, 2025
Latest Version
3.0.1
Package Id
wext-manifest-loader@3.0.1
Unpacked Size
18.19 kB
Size
5.88 kB
File Count
15
NPM Version
10.8.2
Node Version
20.19.2
Published on
Jun 23, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
24
Webpack Loader for Webextension manifest
Generate browser tailored manifest.json
for Web Extensions that you specify properties to appear only in specific browsers.
❤️ it? ⭐️ it on GitHub or Tweet about it.
![]() | ![]() | ![]() | ![]() |
---|---|---|---|
✔ | ✔ | ✔ | ✔ |
This loader will take a definition input for the manifest, and return you content for the specified browser.
Checkout web-extension-starter that uses this package
Ensure you have Node.js 10 or later installed. Then run the following:
1# via npm 2npm install --save-dev wext-manifest-loader wext-manifest-webpack-plugin 3 4# or yarn 5yarn add wext-manifest-loader wext-manifest-webpack-plugin --dev
You can easily use this module together with the wext-manifest-webpack-plugin
to output the manifest.json
as part of your build process without any additional js bundle and with auto rebundling on file change.
Note: Make sure you pass a TARGET_BROWSER env variable with one of chrome/firefox/edge/opera
value
https://github.com/abhijithvijayan/web-extension-starter/blob/react-typescript/source/manifest.json
webpack.config.js
1// ... other plugins 2const WextManifestWebpackPlugin = require("wext-manifest-webpack-plugin"); 3 4const targetBrowser = process.env.TARGET_BROWSER; 5const destPath = path.join(__dirname, 'extension'); 6 7module.exports = { 8 entry: { 9 manifest: './src/manifest.json', 10 // ... 11 }, 12 13 output: { 14 path: path.join(destPath, targetBrowser), 15 filename: 'js/[name].bundle.js', 16 }, 17 18 module: { 19 rules: [ 20 { 21 type: 'javascript/auto', // prevent webpack handling json with its own loaders, 22 test: /manifest\.json$/, 23 use: 'wext-manifest-loader', 24 exclude: /node_modules/, 25 }, 26 ] 27 }, 28 29 plugins: [ 30 new WextManifestWebpackPlugin(), 31 // ... 32 ], 33};
usePackageJSONVersion
Type: Boolean
Default: false
If true, updates manifest.json version
field with package.json
version. It is often useful for easy release of web-extension.
webpack.config.js
1module.exports = { 2 module: { 3 rules: [ 4 { 5 type: 'javascript/auto', // prevent webpack handling json with its own loaders, 6 test: /manifest\.json$/, 7 use: { 8 loader: 'wext-manifest-loader', 9 options: { 10 usePackageJSONVersion: true, 11 }, 12 }, 13 exclude: /node_modules/, 14 }, 15 ], 16 }, 17};
Vendor prefixed manifest keys allow you to write one manifest.json
for multiple vendors.
1{ 2 "__chrome__name": "AwesomeChrome", 3 "__firefox__name": "AwesomeFirefox", 4 "__edge__name": "AwesomeEdge", 5 "__opera__name": "AwesomeOpera" 6}
if the TARGET_BROWSER is chrome
this compiles to:
1{ 2 "name": "AwesomeChrome", 3}
Add keys to multiple vendors by seperating them with |
in the prefix
{
__chrome|opera__name: "AwesomeExtension"
}
if the vendor is chrome
or opera
, this compiles to:
{
"name": "AwesomeExtension"
}
1{ 2 "__dev__name": "NameInDevelopment", 3 "__prod__name": "NameInProduction", 4 "__chrome|firefox|dev__description": "DescriptionInDevelopmentForSetOfBrowsers", 5 "__chrome|firefox|prod__description": "DescriptionInProductionForSetOfBrowsers" 6}
if the NODE_ENV is production
and the TARGET_BROWSER is chrome
this compiles to:
1{ 2 "name": "NameInProduction", 3 "description": "DescriptionInProductionForSetOfBrowsers" 4}
else
1{ 2 "name": "NameInDevelopment", 3 "description": "DescriptionInDevelopmentForSetOfBrowsers" 4}
Looking to contribute? Look for the Good First Issue label.
Please file an issue here for bugs, missing documentation, or unexpected behavior.
@abhijithvijayan/eslint-config
@abhijithvijayan/tsconfig
Thanks to @fregante for suggesting to convert initial (wext-manifest
) module to webpack loader(wext-manifest-loader
)
MIT © Abhijith Vijayan
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More