Skip to content

Commit

Permalink
Update loader.js, rename module to mod to avoid confusing with g…
Browse files Browse the repository at this point in the history
…lobal `module` object (#526)

* Update loader.js

* add changeset
  • Loading branch information
dimaMachina committed Jul 22, 2022
1 parent 4edca5e commit e35bbf7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-ads-cross.md
@@ -0,0 +1,5 @@
---
'nextra': patch
---

chore: rename `module` to `mod` to avoid confusing with global `module` object
4 changes: 2 additions & 2 deletions packages/nextra/loader.js
Expand Up @@ -10,7 +10,7 @@
module.exports = function (code) {
const callback = this.async()
// Note that `import()` caches, so this should be fast enough.
import('./dist/loader.mjs').then(module =>
module.default.call(this, code, callback)
import('./dist/loader.mjs').then(mod =>
mod.default.call(this, code, callback)
)
}

0 comments on commit e35bbf7

Please sign in to comment.