Skip to content

Instantly share code, notes, and snippets.

@mt3o
Created June 7, 2022 14:54
Show Gist options
  • Save mt3o/6a2efad00baaef70b33de095e3e09e8b to your computer and use it in GitHub Desktop.
Save mt3o/6a2efad00baaef70b33de095e3e09e8b to your computer and use it in GitHub Desktop.
hack around ts import error unexpected symbol export
//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