Skip to content

Commit

Permalink
fix: add jsx extensions for next default file convention (#578)
Browse files Browse the repository at this point in the history
* Update index.ts

* Update file count in Next.js plugin test
  • Loading branch information
Jaxenormus authored Apr 3, 2024
1 parent 682c162 commit bd12fe1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/knip/src/plugins/next/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const entry = ['next.config.{js,ts,cjs,mjs}'];
const productionEntryFilePatternsWithoutSrc = [
'{instrumentation,middleware}.{js,ts}',
'app/global-error.{js,jsx,ts,tsx}',
'app/**/{error,layout,loading,not-found,page,template}.{js,jsx,ts,tsx}',
'app/**/{route,default}.{js,ts}',
'app/**/{error,layout,loading,not-found,page,template,default}.{js,jsx,ts,tsx}',
'app/**/{route}.{js,ts}',
'app/{manifest,sitemap,robots}.{js,ts}',
'app/**/{icon,apple-icon}.{js,jsx,ts,tsx}',
'app/**/{opengraph,twitter}-image.{js,jsx,ts,tsx}',
Expand Down
2 changes: 1 addition & 1 deletion packages/knip/test/plugins/next.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test('Find dependencies with the Next.js plugin', async () => {

assert.deepEqual(counters, {
...baseCounters,
files: 1,
files: 3,
devDependencies: 0,
unlisted: 6,
processed: 10,
Expand Down

0 comments on commit bd12fe1

Please sign in to comment.