Merge pull request #1135 from lightpanda-io/importmap

Importmap support
This commit is contained in:
Pierre Tachoire
2025-10-10 09:33:23 +02:00
committed by GitHub
4 changed files with 108 additions and 6 deletions

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<script src="../../testing.js"></script>
<script type=importmap>
{
"imports": {
"core": "./import.js"
}
}
</script>
<script id=use_importmap type=module>
import * as im from 'core';
testing.expectEqual('hello', im.greeting);
</script>
<script id=cached_importmap type=module>
// hopefully cached, who knows, no real way to assert this
// but at least it works.
import * as im from 'core';
testing.expectEqual('hello', im.greeting);
</script>