Skip to content

Commit

Permalink
Compat with node moduleResolution
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed May 28, 2024
1 parent 052d822 commit ab5b962
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/@contentlayer/core/client.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './dist/client.js'
1 change: 1 addition & 0 deletions packages/@contentlayer/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"types": "./dist/index.d.ts",
"files": [
"client.d.ts",
"./dist/**/*.{js,ts,map}",
"./src",
"./package.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/@contentlayer/core/src/client.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { getMDXComponent } from 'mdx-bundler/client'
export { getMDXComponent } from 'mdx-bundler/client/index.js'
2 changes: 0 additions & 2 deletions packages/next-contentlayer/src/hooks/useMDXComponent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ts-expect-error would error if consumers have setup their tsconfig correctly. It's just this tsconfig that's incorrect.
// @ts-ignore - tsconfig. is not set up yet for `exports`
import { getMDXComponent } from '@contentlayer2/core/client'
// NOTE use ESM/CommonJS compat import here until resolved: https://github.com/facebook/react/issues/11503
import React from 'react'
Expand Down

0 comments on commit ab5b962

Please sign in to comment.