Skip to content

Commit

Permalink
refactor: use export = syntax for utility packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed May 3, 2022
1 parent a2c993b commit b9125f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions packages/docusaurus-logger/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,4 @@ const logger = {

// TODO remove when migrating to ESM
// logger can only be default-imported in ESM with this
module.exports = logger;
module.exports.default = logger;

export default logger;
export = logger;
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
*/

import remark from 'remark';
// Import from the transpiled lib because Babel can't transpile `export =`
// TODO change to `../index` after migrating to ESM
import npm2yarn from '../../lib/index';
import npm2yarn from '../index';
import vfile from 'to-vfile';
import path from 'path';
import mdx from 'remark-mdx';
Expand Down

0 comments on commit b9125f8

Please sign in to comment.