Closed cryptozachary closed 2 years ago
I would recommend using a javascript bundler such as webpack, rollup or parcel. Plain javascript has a syntax for importing modules, (more info here) but it comes with some caveats and complexities. So i find using a bundler to be the easiest and most compatible way to use Tone.js.
If you want to continue with the module syntax, then you'll need to follow the recommendation of the error and probably do something like import * as Tone from "./Tone.js"
instead of what you current have.
Hello All,
I've tried adding ./ or ../ to the import and it does not work. When adding the tone.js script directly to my html index file ,it works, however I do not have access to the tone object file in the window , which is what i really need. Pictures below