Commit 829e70f
Add
Summary:
The `clientParamBuilder.bundle.js` UMD bundle uses an anonymous `define()` call, which conflicts with RequireJS on pages like Magento 2 checkout. When RequireJS is present, it intercepts the anonymous `define([], factory)` instead of letting the module register on `window`, causing `clientParamBuilder` to be undefined and breaking checkout JS.
Adding `umdNamedDefine: true` changes the output from `define([], t)` to `define('clientParamBuilder', [], t)`, which prevents RequireJS from hijacking the module as an unresolvable anonymous definition.
Fixes: #28
Ref: facebook/GoogleTagManager-WebTemplate-For-FacebookPixel#31
Reviewed By: ppwang-sa
Differential Revision: D105386494
fbshipit-source-id: 0459a19bc096f8ad31f57bbc7db03d6a0a0994b9umdNamedDefine: true to webpack UMD output1 parent fb55555 commit 829e70f
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments