-
Notifications
You must be signed in to change notification settings - Fork 83
fix(build): Resume UMD bundle build, and restore docs #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we arbitrarily change the window reference? We do have docs claiming window.optimizelyClient
exists. at least I think we'd have to define it as an alias of window.optimizelySdk
.
The current docs say
...which IMO is pretty confusing, but yes they do duplicate what was previously (and with this PR, again) mentioned in the package readme. I suppose we could keep it until if/when the package has exports from its entry point other than @mikeng13 what do you think? |
Yeah we do have devs out there who are using |
build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Okay, that's good few users are affected. However, I think it's valuable to maintain backwards compatibility. What do yall think of
See the updated test plan in the PR description for an example of how this works. |
Summary
build-browser-umd
npm script, which produces dist/optimizely.browser.umd.min.jsoptimizelyClient
->optimizelySdk
, since thecreateInstance
client factory function may be one of several exports of the SDK, in the future.This undoes one bit of #135. I hadn't realized that this asset was documented, and does have some uses, like faster/easier prototyping in a browser.
Test plan
I made a foo.html with
and it still works: