Socket
Socket
Sign inDemoInstall

@dumlj/crx-manifest-webpack-plugin

Package Overview
Dependencies
2
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dumlj/crx-manifest-webpack-plugin

Automatically import files into the chrome extension's manifest.json.


Version published
Weekly downloads
235
increased by30.56%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

License: MIT  Github Repo  NPM Version  See Docs  codecov 

Crx Manifest Webpack Plugin

Automatically import files into the chrome extension's manifest.json.

BACKGROUND

Google Chrome Extension uses manifest.json to configure project. When we use webpack to build, the result file path is not consistent with the source, So we can use Entry to find all dependency files and add them to manifest.json.

FEATURE

  • The files generated by optimization (runtime/chunk) will be imported into the manifest.json automatically.
  • Add configuration based on basic manifest.json.

INSTALL

# use npm
$ npm install --dev @dumlj/crx-manifest-webpack-plugin
# use yarn
$ yarn add --dev @dumlj/crx-manifest-webpack-plugin
# use pnpm
$ pnpm add @dumlj/crx-manifest-webpack-plugin -D

USAGE

import fs from 'fs-extra'
import { CrxManifestWebpackPlugin } from '@dumlj/crx-manifest-webpack-plugin'
import webpack, { type Configuration } from 'webpack'

const manifest: ChromeManifest = fs.readJSONSync(manifestFile)
const config: Configuration = {
  // ...
  plugins: [new CrxManifestWebpackPlugin({ manifest })],
}

export default config

LIVE DEMO

In the demo, the files is output to the memory, please check the console. Or remove the comment writeToDisk: true from the MemfsWebpackPlugin in webpack.config.ts and run yarn build.

INTERNAL DEPENDENCIES

@dumlj/crx-manifest-webpack-plugin
├─┬ @dumlj/seed-webpack-plugin
│ ├─┬─ @dumlj/feature-updater
│ │ ├─── @dumlj/shell-lib
│ │ ├─── @dumlj/util-lib
│ │ └─── @dumlj/mock-libPRIVATE
│ └─── @dumlj/mock-libPRIVATE
└── @dumlj/mock-libPRIVATE

FAQs

Last updated on 11 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc