phetsims / sherpa

Third-party libraries and dependencies for PhET Simulations
http://scenerystack.org/
Other
8 stars 8 forks source link

Investigate if some 3rd party libraries can/should be loaded as modules. #79

Closed samreid closed 3 years ago

samreid commented 4 years ago

From https://github.com/phetsims/chipper/issues/912

We even discussed converting assert and initialize-globals and _ to be loaded via modules. It's not clear whether we would miss the ability to just access them as globals.

Here is the full list of preloads currently in build.json:

      "../sherpa/lib/mdn-array-from-polyfill.js",
      "../sherpa/lib/es6-promise-1e68dc.auto.min.js",
      "../joist/js/splash.js",
      "../sherpa/lib/jquery-2.1.0.js",
      "../sherpa/lib/lodash-4.17.4.js",
      "../sherpa/lib/FileSaver-b8054a2.js",
      "../sherpa/lib/himalaya-0.2.7.js",
      "../sherpa/lib/he-1.1.1.js",
      "../assert/js/assert.js",
      "../query-string-machine/js/QueryStringMachine.js",
      "../chipper/js/initialize-globals.js",
      "../phetcommon/js/analytics/google-analytics.js",
      "../sherpa/lib/seedrandom-2.4.2.js",
      "../sherpa/lib/base64-js-1.2.0.js",
      "../sherpa/lib/TextEncoderLite-3c9f6f0.js",
      "../tandem/js/PhetioIDUtils.js",
      "../chipper/js/SimVersion.js"

At the moment, this seems like a higher cost than benefit, so I'll leave it unassigned for now.

samreid commented 3 years ago

There are no plans to move these as a batch. If we ever move them, it will likely be one at a time and as-needed. Closing.