Skip to content

Commit

Permalink
fix: πŸš‘ support .ts extensions in payload pack
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-labs committed Nov 24, 2024
1 parent d82ddbf commit ef96ee9
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/@lucodear/core/icons/payload/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,25 @@ const p = (
color,
lightColor,
},
fileNames: [icon, ...names].flatMap((name) => [`${name}.tsx`, `${name}.jsx`]),
fileNames: [icon, ...names].flatMap((name) => [
`${name}.tsx`,
`${name}.ts`,
`${name}.jsx`,
`${name}.js`,
]),
fileExtensions: [icon, ...names].flatMap((name) =>
[`${name}.tsx`, `${name}.jsx`].concat(
[`${name}.tsx`, `${name}.jsx`, `${name}.ts`, `${name}.js`].concat(
folderExtensionConfig
? [`${name}/tsx`, `${name}/jsx`, `(${name})/tsx`, `(${name})/jsx`]
? [
`${name}/tsx`,
`${name}/ts`,
`${name}/jsx`,
`${name}/js`,
`(${name})/tsx`,
`(${name})/ts`,
`(${name})/jsx`,
`(${name})/js`,
]
: []
)
),
Expand Down

0 comments on commit ef96ee9

Please sign in to comment.