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
Plotly.js bundles used to have a UMD header which supports various contexts including "synchronous" module system known as CommonJS as well as "asynchronous" module system called AMD.
By introduction of native ES6 import in new browsers as well as modern node.js runtimes; which is now the standard way of loading "asynchronous" modules, RequireJS which is an implementation of AMD is no longer under active development. See requirejs/r.js@2.3.6...2.3.7
In this context keeping the AMD support as part of the header we add to the esbuild bundle here could potentially break pages when RequireJS is loaded to the page.
To avoid this situation, it is suggested that we remove the AMD part of the header from the bundles so that the bundle could successfully be loaded via script tags both synchronously and asynchronously using CJS require and ESM import commands
Plotly.js bundles used to have a UMD header which supports various contexts including "synchronous" module system known as
CommonJS
as well as "asynchronous" module system called AMD.By introduction of native ES6 import in new browsers as well as modern
node.js
runtimes; which is now the standard way of loading "asynchronous" modules,RequireJS
which is an implementation of AMD is no longer under active development. See requirejs/r.js@2.3.6...2.3.7In this context keeping the AMD support as part of the header we add to the
esbuild
bundle here could potentially break pages whenRequireJS
is loaded to the page.To avoid this situation, it is suggested that we remove the AMD part of the header from the bundles so that the bundle could successfully be loaded via script tags both synchronously and asynchronously using CJS
require
and ESMimport
commandsExamples of asynchronous loading
Example of synchronous loading
The text was updated successfully, but these errors were encountered: