Skip to content

Enabling static import into serverside code #3640

Open
@stevejpurves

Description

@stevejpurves

Problem

It is currently not possible to statically import ipywidgets into a platform like remix.run or next.js because of module side effects. The objective is not to enable SSR using jupyter widgets, but instead to reduce the friction of using them in frameworks that do SSR.

This is related to open issues in JupyterLab and Lumino here:

Proposed Solution

Bring in the change suggested in this comment:

const ElementProto: any = Element.prototype; // : typeof Element = (typeof Element !== 'undefined' && Element.prototype) || {};

and work though any implications of that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions