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
## Summary
**BREAKING**: Drop support for `window.optimizelyClient`, as presaged in the [CHANGELOG](https://github.com/optimizely/javascript-sdk/blob/master/packages/optimizely-sdk/CHANGELOG.MD#213---august-21-2018).
- Pull in changes from 2.3.x, to ensure that both optimizely.browser.umd.js and optimizely.browser.umd.min.js are defined.
- Refactor those changes to use webpack config/index.browser code instead of appending to the bundle after-the-fact.
- Actually install `webpack` as a devDependency rather than always using latest
In addition to fixing the issue from #187 in this branch, it simplifies the build script.
## Test plan
Existing unit tests pass since the "node" API for index.browser.js wasn't changed.
Created a test file called "dist/test.html" and loaded it in a browser (as well as an equivalent one that loads the min.js variant):
```html
<!DOCTYPE html>
<html>
<head>
<script src="/optimizely.browser.umd.js"></script>
</head>
<body>
<h1>Hello</h1>
<script>
console.log('optimizelySdk', typeof optimizelySdk);
console.log('optimizelyClient', typeof optimizelyClient);
</script>
</body>
</html>
```
Ensured that it logged "object" for the first, and "undefined" for the second:

## Issues
- OASIS-3790
Copy file name to clipboardExpand all lines: packages/optimizely-sdk/README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,9 @@ See the Optimizely X Full Stack [developer documentation](http://developers.opti
35
35
The package's entry point is a CommonJS module, which can be used directly in environments which support it (e.g., Node.js, or loaded in a browser via Browserify or RequireJS). Additionally, you can include a standalone bundle of the SDK in your web page by fetching it from [unpkg](https://unpkg.com/):
0 commit comments