Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manual import via doit doesn't work for non-packages #33

Open
rksm opened this issue Aug 13, 2016 · 0 comments
Open

manual import via doit doesn't work for non-packages #33

rksm opened this issue Aug 13, 2016 · 0 comments

Comments

@rksm
Copy link
Member

rksm commented Aug 13, 2016

When evaluating an import statement such as import { h } from "virtual-dom"; from a module that is not contained inside a lively package, the import will not resolve the module correctly, i.e. h in the example will be undefined.

Config code:

"systemjs": {
    "map": {"virtual-dom": "./node_modules/virtual-dom/dist/virtual-dom.js"},
    "meta": {"node_modules/virtual-dom/dist/virtual-dom.js": {"format": "amd"}}
}

It seems that the import statement doesn't use the parent module for lookup:
await System.normalize("virtual-dom") => http://localhost:9001/virtual-dom
vs.
await System.normalize("virtual-dom", lively.modules.module("lively.morphic/index.js").id) => http://localhost:9001/node_modules/lively.morphic/node_modules/virtual-dom/dist/virtual-dom.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant