
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
next-unused
Advanced tools
next-unused is an easy way to find unused files in your [Next.js](https://github.com/zeit/next.js) project.
next-unused is an easy way to find unused files in your Next.js project.
Make sure you install as a devDependency, otherwise you will add 60mb+ to your build.
$ yarn add next-unused -D
In package.json, add a script to find unused files:
"scripts": {
"find:unused": "next-unused"
}
Run the script to list any unused files: yarn find:unused.
Add a property to your package.json to configure next-unused:
{
"next-unused": {
"alias": {},
"include": [],
"exclude": [],
"entrypoints": []
}
}
| Property | Type | Default | Description |
|---|---|---|---|
debug | boolean | false | turn on debug messages |
alias | object | {} | import aliases in webpack format ({ "@components": "components/" }) |
include | string[] | ['pages'] | list of directories to search through. pages is always included |
exclude | string[] | [] | array of RegExp that exclude matching filenames |
entrypoints | string[] | ['pages'] | list of directories to use as entrypoints. pages is always included |
Your Next.js setup looks like this:
package.json
├─ pages/
│ ├─ index.js
└─ components/
├─ button.js
└─ image.js
And your pages/index.js contains:
import Button from '../components/button'
export default () => {
return (
<Button>Click me</Button>
)
}
Configure next-unused to include the components directory in package.json:
{
"next-unused": {
"include": ["components"]
}
}
Running next-unused will output:
Found 1 unused file:
components/image.js
Shu and Luc wrote the initial version of this script.
FAQs
next-unused is an easy way to find unused files in your [Next.js](https://github.com/zeit/next.js) project.
The npm package next-unused receives a total of 5,849 weekly downloads. As such, next-unused popularity was classified as popular.
We found that next-unused demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.