Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unplugin-unused

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin-unused

Check unused dependencies.

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

unplugin-unused npm

Unit Test

Check unused dependencies.

Installation

npm i -D unplugin-unused

Usage

Unused({
  include: [/\.([cm]?[jt]sx?|vue)$/],
  exclude: [/node_modules/],
  level: 'warning', // or 'error'
  /**
   * Ignore some dependencies.
   */
  ignore: {
    peerDependencies: ['vue'],
  },
  // Or ignore all kinds of dependencies.
  // ignore: ['vue'],

  /**
   * Dependency kinds to check.
   */
  depKinds: ['dependencies', 'peerDependencies'],
})
Vite
// vite.config.ts
import UnpluginUnused from 'unplugin-unused/vite'

export default defineConfig({
  plugins: [UnpluginUnused()],
})


Rollup
// rollup.config.js
import UnpluginUnused from 'unplugin-unused/rollup'

export default {
  plugins: [UnpluginUnused()],
}


Rolldown
// rolldown.config.js
import UnpluginUnused from 'unplugin-unused/rolldown'

export default {
  plugins: [UnpluginUnused()],
}


esbuild
// esbuild.config.js
import { build } from 'esbuild'

build({
  plugins: [require('unplugin-unused/esbuild')()],
})


Webpack
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [require('unplugin-unused/webpack')()],
}


Sponsors

License

MIT License © 2024-PRESENT 三咲智子

Keywords

FAQs

Package last updated on 06 Sep 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc