Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
recursivedoubts
· 1y ago · 0 comments
JS modules can't be imported with a plain script tag.
Comments
[–]
throw5959
1y ago
Script type=module doesn't work?
[–]
rob
1y ago
Not if you want to support the 0.2% market share that IE 11 has.
[–]
danpalmer
1y ago
That's true, but also a trade-off that is a perfectly valid engineering choice for many or even most teams.
[–]
cryptos
1y ago
HTMX 2 stopped IE support, so that shouldn't be an issue.
[–]
knowitnone
1y ago
we don't :)
[–]
recursivedoubts
OP
1y ago
we want to support the traditional script tag w/ a src attribute and nothing else
[–]
throw5959
1y ago
Why?
[–]
recursivedoubts
OP
1y ago
idk just like it better that way
[–]
seumars
1y ago
you can define import maps in a separate <script> tag and reuse the module name elsewhere
[–]
recursivedoubts
OP
1y ago
sure, but I wanted the same experience of, say, jquery, where you just drop in a script tag w/ a src attribute and it just works
an aesthetic decision, I suppose