Skip to content

Commit

Permalink
skip types
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Sep 19, 2024
1 parent dae26e1 commit fdbe8fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/next-codemod/transforms/async-request-api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { transformDynamicProps } from './next-async-dynamic-prop'
import { transformDynamicAPI } from './next-async-dynamic-api'

export default function transform(file: FileInfo, api: API) {
const filePath = file.path
// if it's node_modules or types file, skip
if (/node_modules/.test(filePath) || /\.d\.(m|c)?ts$/.test(filePath)) {
return file.source
}
const transforms = [transformDynamicProps, transformDynamicAPI]

return transforms.reduce<string>((source, transformFn) => {
Expand Down

0 comments on commit fdbe8fa

Please sign in to comment.