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
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.hin the example will be undefined.Config code:
It seems that the import statement doesn't use the parent module for lookup:
await System.normalize("virtual-dom")=>http://localhost:9001/virtual-domvs.
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