diff --git a/src/jsifier.js b/src/jsifier.js index f58b596be346d..03beb49890d9e 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -26,7 +26,11 @@ function JSify(data, functionsOnly) { if (mainPass) { var shellFile = SHELL_FILE ? SHELL_FILE : (BUILD_AS_SHARED_LIB || SIDE_MODULE ? 'shell_sharedlib.js' : 'shell.js'); - var thirdPartyFiles = ['../third_party/sodiumutil/dist/sodiumutil.js']; + var thirdPartyFiles = []; + + if (INCLUDE_THIRD_PARTY_SODIUMUTIL) { + thirdPartyFiles.push('../third_party/sodiumutil/dist/sodiumutil.js'); + } // We will start to print out the data, but must do so carefully - we are // dealing with potentially *huge* strings. Convenient replacements and diff --git a/tools/shared.py b/tools/shared.py index dc0f6fc319ec8..54fc76749df07 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -2281,6 +2281,7 @@ def to_nice_ident(ident): # limited version of the JS function toNiceIdent @staticmethod def get_subresource_location(path, data_uri=Settings.SINGLE_FILE): if data_uri: + Settings.INCLUDE_THIRD_PARTY_SODIUMUTIL = 1 f = open(path, 'rb') data = base64.b64encode(f.read()) f.close()