From 7b3a3aa74379465690dfed9c6c9f766809cf95c6 Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Fri, 17 Sep 2021 23:31:00 +0100 Subject: [PATCH] Prevent request of (non-existent) closure/goog/deps.js (#5499) Since the only part of the Closure Library we have is base.js, prevent it from trying to load deps.js from the same directory. (We already load our own dependency graph from tests/deps.js.) --- blockly_uncompressed.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blockly_uncompressed.js b/blockly_uncompressed.js index 47e9b7e9b..ff0971da3 100644 --- a/blockly_uncompressed.js +++ b/blockly_uncompressed.js @@ -16,7 +16,7 @@ * loads closure/goog/base.js and tests/deps.js, then (in any case) * requires Blockly.requires. */ -(function(_global) { +(function(globalThis) { /* eslint-disable no-undef */ var IS_NODE_JS = !!(typeof module !== 'undefined' && module.exports); @@ -40,6 +40,8 @@ if (!BLOCKLY_DIR) { alert('Could not detect Blockly\'s directory name.'); } + // Disable loading of closure/goog/deps.js (which doesn't exist). + globalThis.CLOSURE_NO_DEPS = true; // Load Closure Library base.js (the only part of the libary we use, // mainly for goog.require / goog.provide / goog.module). document.write(