Serving panel with plotly extension offline

@philippjfr I would like to restart this discussion. It seems since 0.11 there is this new Bokeh model called “tabulator” which gets loaded even if it isn’t used. It is declared exactly like the plotly model, so I believe we could restart this discussion in general about panel “custom” bokeh models working offline.

Using solutions as mentioned here to have it inline doesn’t work: Serving panel with plotly extension offline Panel regression? (embedding panel in gunicorn+Flask)

pn.config.js_files  = {'tabulator': r'/static/js/tabulator.js',
                          'moment': r'/static/js/moment.js'}
pn.config.inline = True
settings.resources = 'inline'

The two js files and the css files are systematically loaded from the external resource and I don’t see how this PR: Add support for serving static files by philippjfr · Pull Request #1319 · holoviz/panel · GitHub will help me with it.

I also don’t understand why tabulator JS code gets loaded although I don’t have a tabulator object. In one case I don’t even have any pn.widgets object but it still requires to load these three files.

Can we change the path to which __javascript__, __css__ and __js_require__ point to without changing Panel’s code?

Thanks :slight_smile: