Closed fifthist closed 2 years ago
I don't think Tone.toString()
is a valid function in the latest version. Maybe it previously worked before moving entirely over to typescript.
Try something like Tone.version.toString()
instead.
The namespace Tone
is missing entirely.
@fifthist do you have any guesses what might be causing this issue in this specific context? I can confirm that loading that cloudflare link in a browser script tag works fine:
I can also see the UMD header that webpack adds is the same in both:
14.8.26
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Tone=e():t.Tone=e()}("undefined"!=typeof self?self:this,function()
14.5.37
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Tone=e():t.Tone=e()}("undefined"!=typeof self?self:this,function()
I also use puppeteer for testing all of the example pages that works fine, but i load the script tag on the page, not through addScriptTag
. Your help in debugging this setup would be greatly appreciated.
@tambien I'll take a look. Can you paste how you load Tone with puppeteer on the page?
Issue was with an old headless-chrome binary I was using. Having puppeteer download the latest headless chrome binary resolves the issue.
There seems to be a discrepancy in how Tone is imported into headless browsers post version 14.5.37
To Reproduce
Expected behavior
Tone
loaded into global namepsace.What I've tried Loading version 14.5.37 instead of the latest version, and this seems to work.