Closed jonaslund closed 2 years ago
Morning @jonaslund. I'll preface this with a - I might be wrong here. My understanding of a bundler such as Webpack is that it only bundles up the scripts you import. So:
Rather than using the full import of Tone, for example:
import * as Tone from 'tone'
const synth = new Tone.Synth()
You could instead just import the classes that you need:
import { Synth } from 'tone'
const synth = new Synth()
This should reduce the amount of code that you're loading and including in the final bundle of your application.
Yes, good point.
I'm pressed for performance space, and would like to have the option of building a custom version of Tone.js that only includes a subset of features, let's say, I only need to use the Tone.Synth, no AM/FM Synths etc, and only the Sequencer.
How could I reduce the total kb's of usage from Tone.js by building a custom limited slimmed down version?
Thank you for a super library :)