Created
June 7, 2022 14:54
-
-
Save mt3o/6a2efad00baaef70b33de095e3e09e8b to your computer and use it in GitHub Desktop.
hack around ts import error unexpected symbol export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//hack around es6 modules incompatibility | |
//when import fetch from 'node-fetch'; fails | |
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment