Skip to content

Commit c2812e2

Browse files
committed
Rework unfetch/polyfill for make it bundler-agnostic.
1 parent ba16a12 commit c2812e2

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

polyfill.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

polyfill/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "unfetch-polyfill",
3+
"main": "index.js",
4+
"module": "polyfill.mjs"
5+
}

polyfill/polyfill.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import unfetch from '../src/index.mjs';
2+
if (!self.fetch) self.fetch = unfetch;

0 commit comments

Comments
 (0)