Skip to content

Commit

Permalink
loader: fix types
Browse files Browse the repository at this point in the history
Closes GH-2386.

Reviewed-by: Titus Wormer <[email protected]>
  • Loading branch information
remcohaszing authored Oct 27, 2023
1 parent 038bb68 commit 85c5dd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/loader/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

'use strict'

// Note: we can’t export immediately, as TS generates broken types.
// See: mdx-js/mdx#2386.
module.exports = loader

/**
* Webpack loader
*
Expand All @@ -19,7 +23,7 @@
* @returns {undefined}
* Nothing.
*/
module.exports = function (code) {
function loader(code) {
const callback = this.async()
// Note that `import()` caches, so this should be fast enough.
import('./lib/index.js').then((module) => {
Expand Down

1 comment on commit 85c5dd0

@vercel
Copy link

@vercel vercel bot commented on 85c5dd0 Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mdx – ./

v2.mdxjs.com
mdx-mdx.vercel.app
mdx-git-main-mdx.vercel.app
mdxjs.com

Please sign in to comment.