Remove the SystemJS dependency from the web/preferences.js
file
#11911
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally the
default_preferences.json
file was checked into the repository, and we thus needed to load it in non-PRODUCTION mode (which was originally done asynchronously usingXMLHttpRequest
). Over the years a lot has changed and thedefault_preferences.json
file is now built, by thegulp default_preferences
task, from theweb/app_options.js
file. Hence it's no longer necessary, in non-PRODUCTION mode, to use SystemJS here since we can simply use a standardimport
statement instead.Note how e.g.
web/app.js
already imports fromweb/app_options.js
in the same exact way thatweb/preferences.js
now does, hence this patch will not result in any significant changes in the built/bundled viewer file.This is another (small) part in trying to reduce usage of SystemJS, with the goal of hopefully getting rid of it completely. (I've started working on this, and doing so has identified a number of problem areas; this patch addresses one of them.)