Skip to content

Commit 85c5dd0

Browse files
authoredOct 27, 2023
loader: fix types
Closes GH-2386. Reviewed-by: Titus Wormer <tituswormer@gmail.com>
1 parent 038bb68 commit 85c5dd0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎packages/loader/index.cjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
'use strict'
99

10+
// Note: we can’t export immediately, as TS generates broken types.
11+
// See: mdx-js/mdx#2386.
12+
module.exports = loader
13+
1014
/**
1115
* Webpack loader
1216
*
@@ -19,7 +23,7 @@
1923
* @returns {undefined}
2024
* Nothing.
2125
*/
22-
module.exports = function (code) {
26+
function loader(code) {
2327
const callback = this.async()
2428
// Note that `import()` caches, so this should be fast enough.
2529
import('./lib/index.js').then((module) => {

1 commit comments

Comments
 (1)

vercel[bot] commented on Oct 27, 2023

@vercel[bot]

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.