Closed FluorescentHallucinogen closed 11 months ago
It's funny because was planning to work on that tomorrow:)
Would it make sense if the script tries to inline the importmap by default when the file ends with .html
? (It would either replace the existing importmap script or inject one at the top of the html)
Here's how it's implemented in JSPM CLI: https://jspm.org/getting-started
jspm link index.html -p nodemodules -o index.html
Would it make sense if the script tries to inline the importmap by default when the file ends with
.html
?
Yes.
The command would look like this
npx @jsenv/importmap-node-module index.html --entrypoint=index.html --remove-unused
Version 6.0.0 just published on NPM. It is now possible to inline importmap into html.
You can try with the following command:
npx @jsenv/importmap-node-module index.html --remove-unused
@dmail Thank you very much! ❤️
The
npx @jsenv/importmap-node-module project.importmap --entrypoint index.html --remove-unused
command generates theproject.importmap
file. The ReadMe say I need to add the following into theindex.html
code by hand:But I get the
External import maps are not yet supported.
error in the latest version of Chrome.It seems external import maps are not yet supported in Firefox and Safari too.
What about an option that injects inline import map into the
index.html
code automatically?