pacocoursey / next-unused

Find unused files in your Next.js projects
421 stars 15 forks source link

Entrypoint is a file, not a directory #26

Open heymartinadams opened 11 months ago

heymartinadams commented 11 months ago

The following specification in my package.json file doesn’t handle any files that are called in the tailwind.config.js file.

"next-unused": {
  "alias": {
    "-": "contexts",
    "~": "design/elements",
    "^": "design/layouts",
    "@": "design/styles",
    "=": "hooks",
    "#": "utils/lib",
    "+": "utils"
  },
  "include": [
    "contexts",
    "design",
    "hooks",
    "pages",
    "utils"
  ],
  "exclude": [],
  "entrypoints": [
    "./pages",
    "./tailwind.config.js"
  ]
},

In tailwind.config.js, I import some files which show up as unused.

// Utilities
import base from './utils/lib/themes/_static/base'
import themesCreate from './utils/lib/themes/create'
import themeSet from './utils/lib/themes/set'