Skip to content

Instantly share code, notes, and snippets.

View rkJun's full-sized avatar

Juntai Park rkJun

View GitHub Profile
@rkJun
rkJun / I'm a night 🦉
Last active September 7, 2021 01:00
I'm an early
🌞 Morning 26 commits ███▍░░░░░░░░░░░░░░░░░ 16.1%
🌆 Daytime 51 commits ██████▋░░░░░░░░░░░░░░ 31.7%
🌃 Evening 35 commits ████▌░░░░░░░░░░░░░░░░ 21.7%
🌙 Night 49 commits ██████▍░░░░░░░░░░░░░░ 30.4%
@rkJun
rkJun / esm-package.md
Created July 12, 2021 16:35 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package linked to from here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.