Skip to content

The extension breaks script[type=importmap] #634

@pomek

Description

@pomek

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Use the following HTML page as an example:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Home</title>
    <script type="importmap">
      {
        "imports": {
          "dayjs": "https://cdn.skypack.dev/[email protected]"
        }
      }
    </script>
  </head>
  <body>
    <script type="module">
      import dayjs from 'dayjs';

      console.log(dayjs('2019-01-25').format('YYYY-MM-DDTHH:mm:ssZ[Z]'));
    </script>
  </body>
</html>

Steps to reproduce

  1. Run an HTTP server and visit the mentioned HTML page.
  2. The browser reports the following error:
    Uncaught TypeError: Failed to resolve module specifier "dayjs". Relative references must start with either "/", "./", or "../".
    
  3. Disabling the extension for the particular domain does not help.

Browser

Chrome

Extension version

4.3.0

Anything else?

I think, the extension executes some scripts before the script[type=importmap] element is being processed.

image

Removing the extension helps.

image

Metadata

Metadata

Assignees

Labels

type:bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions