Skip to content

unable to import subpath inside package #320

@trusktr

Description

@trusktr

https://generator.jspm.io/#U2NhYGBkDM0rySzJSU1hcMgpzU3Vz8ksS9VNzk9JdTDQM9UzAgATxCqeJAA

Presumably (I'm haven't checked) this is because of the darn thing called package.json exports. If so, I think it is absolutely horrible: I don't want to import the whole package and everything in it, when all I want is one specific thing. (EDIT: yep, exports)

Keep in mind this all works perfectly with vanilla modules in a browser when I make an importmap manually:

https://github.com/lume/live-code/blob/bbef27fe581d9a29e769c93e26ad7fcd8c05df64/examples/index.html#L11-L50

But with JSPM Generator and the CDN, it is limited because it tries to behave like Node.js (I'm guessing) although it is not.

I have no choice but to skip using JSPM Generator and CDN for the live-code project, because I have a feeling you're gonna say that's how it works and will not change. :(

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