Commit 40a512e
authored
feat(web-global-build): impl (#1225)
<!-- 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]>1 parent 28850b7 commit 40a512e
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | | - | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
0 commit comments