Open
Description
There is a little bit of disconnect between the cli
and using the node-loader
.
When we generate an importmap using jspm-cli
. It creates an importmap using importmap.json
as a default name.
https://github.com/jspm/jspm-cli/blob/b938c175ae040bd8af96a2e60179c4f9c837e008/src/utils.ts#L11
// Default import map to use if none is provided:
const defaultInputPath = "./importmap.json";
But the @jspm/node-importmap-loader
expects the default file to be node.importmap
https://github.com/jspm/node-importmap-http-loader/blob/main/src/config.ts#L21
export const nodeImportMapPath = join(root, "node.importmap");
So, when users create a new map using the cli. They have two options.
- Manually change the name of the file from
importmap.json
tonode.importmap
. Since the loader doesn't accept the file-name to be passed as an argument as of now. - Or while creating the importmap using the cli, they need to pass a flag
--output node.importmap
to avoid manual step.
This creates a little friction and users need to remember about the file name mis-match. To avoid this, the node loader should use importmap.json
by default. Since cli
is much used and impact more changes there.
Task
- Change the default to
importmap.json
- Update all the tests and examples to use
importmap.json