
Hi! I’m trying to use Bokehjs in a web app which uses webpack as a bundler, it actually works but I get quite large resulting js bundle of size 3MB. I’m not very proficient at writing webpack configs, but I wonder if it is actually a good/supported way to include bokeh in your app at all? I searched documentation and examples but looks like this is not very popular way to use bokeh (at least).
I’m importing bokeh like this:
import * as Bokeh from '@bokeh/bokehjs'
const plt = Bokeh.Plotting
const np = Bokeh.LinAlg
const n = 100;
const x = np.linspace(0, 20, n);
const y = x.map(x => Math.sin(x));
const p = plt.figure({ height: 300 });
p.line(x, y);
plt.show(p, "#root");
Minimal app + webpack configs are here:
Output of webpack-bundle-analyzer:





