-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Proposal from #1547: go back to using require.js for this notebook, and leave webpack for newer projects, such as jupyterlab.
The switch to webpack in the legacy notebook seems to make lots of backward-compatibility maintenance impossible, and has been the source of numerous issues (#1547, #1439, #1431, etc.). Following some discussion in #1547, I think it's not feasible to maintain our goals of backward-compatibility in the existing notebook javascript while adopting webpack. The key point being that it seems to be impossible to include a module in the webpack, and then load it later with require, which is a necessity for numerous extensions and official APIs.
If that's not true, and we are just failing to configure things correctly, there might be a nicer, simpler fix. But this gist is, for the notebook js the following two things must return the same object:
require('notebook/js/cell')in our packed-up sourcesrequire('notebook/js/cell')at runtime, in outputs, custom.js, or nbextensions
(and so on, for codemirror and everything else we load via require). The behavior in master is to load a different copy of the module, which is causing all kinds of things to break.