refactor: use export = syntax for utility packages (#7295)

This commit is contained in:
Joshua Chen 2022-05-03 20:22:22 +08:00 committed by GitHub
parent a2c993bf9a
commit 1a9bdd1a4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View file

@ -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;

View file

@ -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';