Skip to content

Merge / expose importmaps somehow? #38

Closed
@matthiask

Description

@matthiask

Hey

Sorry in advance for my rambling.

I have been looking into using ES modules and for django-prose-editor; I do not want to load individual Tiptap and ProseMirror modules from esm.sh or something like that because I do not want to depend on an external resource and because it's really really slow (because there are so many modules involved)

I could build an ES module and expose that, but then I have all the problems with the ManifestStaticFilesStorage and people having to configure their own static files storage and enable JS module aggregation and whatnot, and that's complex and annoying to do -- I do not want the setup of the editor to be that annoying in projects.

So, I have discovered importmaps, as have you! Importmaps are great, the problem is that they only exist in singular today; proposals are going around for supporting several importmaps. But, browser support isn't great anyway, and requiring something which isn't even here yet is even less great. If browsers supported multiple importmaps I could just ship my own importmap for django-prose-editor (using object-based media!). But, that's not possible obviously right now.

Are you interested in collaboratively designing and/or developing a way of building an importmap from multiple sources? I think something like this could be a good fit for django-esm. If I understand the docs and code correctly you're only using package.json and the static file finders now, but you aren't exposing hooks to third party apps to add to the importmap -- users of django-esm have to configure everything themselves. So, it's mostly for consuming their own scripts and scripts from node_modules if I understand correctly, and not really for third party packages?

It's quite probable I'm misunderstanding something, but I wanted to ask before following my NIH impulse again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions