mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Use native import maps
in development mode
This patch seem to work fine locally now, and `mozregression` points to it being fixed in bug https://bugzilla.mozilla.org/show_bug.cgi?id=1803984 which landed in Firefox 116. By using the native `import maps` functionality, we can remove a development dependency. Please find the specification at https://wicg.github.io/import-maps/
This commit is contained in:
parent
36c3c0a4c1
commit
5e986cb514
6 changed files with 8 additions and 22 deletions
|
@ -41,8 +41,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<!--#endif-->
|
||||
|
||||
<!--#if !MOZCENTRAL-->
|
||||
<script defer src="../node_modules/es-module-shims/dist/es-module-shims.js"></script>
|
||||
<script type="importmap-shim">
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"pdfjs/": "../src/",
|
||||
|
@ -73,8 +72,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="viewer-geckoview.js" type="module-shim"></script>
|
||||
<script src="viewer-geckoview.js" type="module"></script>
|
||||
<!--#else-->
|
||||
<!--<script src="resource://pdf.js/web/viewer.mjs" type="module"></script>-->
|
||||
<!--#endif-->
|
||||
|
|
|
@ -50,8 +50,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<!--#elif /* Development mode. */-->
|
||||
<link rel="resource" type="application/l10n" href="locale/locale.properties">
|
||||
|
||||
<script defer src="../node_modules/es-module-shims/dist/es-module-shims.js"></script>
|
||||
<script type="importmap-shim">
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"pdfjs/": "../src/",
|
||||
|
@ -82,8 +81,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="viewer.js" type="module-shim"></script>
|
||||
<script src="viewer.js" type="module"></script>
|
||||
<!--#endif-->
|
||||
</head>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue