Using an index file as an import map entry point, I have found that depending on how I define the string indicating the import that the import map either fails succeeds. For example
This works (i.e. the import map is generated correctly)
This seems very odd to me - at a guess I would say the the import expression is hoisted above variable assignment (not sure if this makes sense). In any case, I didn't expect that dynamic imports would be sensitive to the way in which path-strings are defined (not sure if this is JSPM or something else)
The use case is that I would like to be able to pick up when a user adds a new file that should be included in import map generation:
Using an index file as an import map entry point, I have found that depending on how I define the string indicating the import that the import map either fails succeeds. For example
This works (i.e. the import map is generated correctly)
This does not work (the dynamic import is ignored)
This does not work (the dynamic import is ignored)
This does not work (the dynamic import is ignored)
This seems very odd to me - at a guess I would say the the import expression is hoisted above variable assignment (not sure if this makes sense). In any case, I didn't expect that dynamic imports would be sensitive to the way in which path-strings are defined (not sure if this is JSPM or something else)
The use case is that I would like to be able to pick up when a user adds a new file that should be included in import map generation: