You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->
## This PR
- Implements a global (IIFE) build for the web.
- Adds support for global distribution via CDN by including `unpkg` and
`jsdelivr` fields in `package.json`.
### Notes
- The global build outputs to `dist/global/index.js`.
- The global bundle is exposed under the global name `OpenFeature`.
### Follow-up Tasks
- Consider adding automated tests or validation for the global bundle.
- If this bundle should be included in a release checklist or CI, link
the appropriate issue here.
### How to test
1. Run `npm run build` and ensure `dist/global/index.js` is generated.
2. Serve the file locally or upload to a CDN and verify that
`window.OpenFeature` is available in the browser console.
### Motivation
Trying to load OpenFeature as a first dependency before browser will
resolve any modules.
---------
Signed-off-by: Patryk Zdunowski <[email protected]>
"build": "npm run clean && npm run build:web-esm && npm run build:web-cjs && npm run build:rollup-types",
28
+
"build": "npm run clean && npm run build:web-esm && npm run build:web-cjs && npm run build:web-global && npm run build:web-global:min && npm run build:rollup-types",
0 commit comments