mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Previously we had code that would, in uncompiled mode, make sure that javascriptGenerator etc. were set to the corresponding module exports object (by fetching it with goog.module.get), but in compressed mode we made no effort to set (e.g.) javascriptGenerator to Blockly.JavaScript, which is where that export actually appears in the namespace tree when loading the chunk via a <script> tag. This commit introduces two new configuration options to bootstrap.js (preconfigured with defaults that should work in most cases) mapping global variable names to their corresponding module identifiers, and modifies the code in bootstrap_helper.js to set global variables appropriately in both uncompressed and compressed modes.