Mohammad Asif cf937194cb Removed un-waned things 1. | 5 ヶ月 前 | |
---|---|---|
.. | ||
CHANGELOG.md | 5 ヶ月 前 | |
LICENSE | 5 ヶ月 前 | |
README.md | 5 ヶ月 前 | |
browser.d.ts | 5 ヶ月 前 | |
browser.js | 5 ヶ月 前 | |
node.d.ts | 5 ヶ月 前 | |
node.js | 5 ヶ月 前 | |
package.json | 5 ヶ月 前 |
Meta-package to make browsers and Node use different EventSource polyfills
npm install @sanity/eventsource
import polyfilledEventSource from '@sanity/eventsource'
The polyfill adds support for auth headers, which isn't part of the EventSource spec.
In NodeJS environments it's the implementation from eventsource package. While browsers use event-source-polyfill.
To get the browser implementation, no matter how your bundler or runtime understands package.json
exports
, you can use the following:
import polyfilledEventSource from '@sanity/eventsource/browser'
To force the Node implementation, use the following:
import polyfilledEventSource from '@sanity/eventsource/node'
Run "CI & Release" workflow. Make sure to select the main branch and check "Release new version".
Semantic release will only release on configured branches, so it is safe to run release on any branch.
MIT © Sanity.io