Open granicz opened 1 year ago
@granicz First I am adding the possibility npm package-based imports.
I am modifying JS.Import to follow rules used by JS imports too:
JS.Import("foo", "./localEmbedded.js")
.JS.Import("foo", "../AnotherLib/embedded.js")
JS.Import("foo", "date-fns")
will import from npm package "date-fns"
. Generally, if the import path does not start with ./
or ../
, it is preserved exactly.
When using npm package-based imports, such as:
then raise an error, if the given npm package is not defined in the project file, say, using the femto convention: