Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the SystemJS dependency from the web/preferences.js file #11911

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented May 16, 2020

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 using XMLHttpRequest). Over the years a lot has changed and the default_preferences.json file is now built, by the gulp default_preferences task, from the web/app_options.js file. Hence it's no longer necessary, in non-PRODUCTION mode, to use SystemJS here since we can simply use a standard import statement instead.

Note how e.g. web/app.js already imports from web/app_options.js in the same exact way that web/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.)

@Snuffleupagus Snuffleupagus force-pushed the getDefaultPreferences-rm-SystemJS branch from 9e0a40e to bf75b2b Compare May 16, 2020 14:21
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 using `XMLHttpRequest`). Over the years a lot has changed and the `default_preferences.json` file is now built, by the `gulp default_preferences` task, from the `web/app_options.js` file. Hence it's no longer necessary, in non-PRODUCTION mode, to use SystemJS here since we can simply use a standard `import` statement instead.

Note how e.g. `web/app.js` already imports from `web/app_options.js` in the same exact way that `web/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.)
@Snuffleupagus Snuffleupagus force-pushed the getDefaultPreferences-rm-SystemJS branch from bf75b2b to 8f24415 Compare May 16, 2020 14:22
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/616bc0b4b6d04cf/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/616bc0b4b6d04cf/output.txt

Total script time: 3.28 mins

Published

@timvandermeij timvandermeij merged commit 6ffcedc into mozilla:master May 16, 2020
@timvandermeij
Copy link
Contributor

Nice find; thank you for working on reducing SystemJS usage!

@Snuffleupagus Snuffleupagus deleted the getDefaultPreferences-rm-SystemJS branch May 17, 2020 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants