I figured out a solution to my problem that doesn’t directly address this but accomplishes the same functionality.
I decided to use the Anvil way of accessing a module from python (anvil.js.import_from):
if anvil.app.environment.name == 'Production':
self.js_module = anvil.js.import_from('https://productionurl.com/_/theme/design_tool.js')
else:
self.js_module = anvil.js.import_from('https://debugurl.com/LONGSECRETKEY/_/theme/design_tool.js')