<!-- Thank you for contributing to Pyodide! All improvements are welcome,
     so don't be afraid to make a PR. -->

<!-- [IMPORTANT] Note on CI failures:
     Currently, we are having issues with selenium-based tests.
     Don't panic if the CI fails on your PR because of timeouts.
     It's probably not your fault. We will investigate :) -->

### Description
The PR is to avoid `importScripts` error when loading pyodide in a module type worker. Currently `loadScripts`  uses `importScripts` to import dependency  which throws an error when the worker is of type `module`.

### Checklists

<!-- Note on checklists:
     If you think some of these steps are not necessary for your PR,
     just remove those checkboxes, or mark them as checked. Otherwise,
     if some checkboxes are left unmarked, we might assume that your PR
     is not ready to be merged and we might keep you waiting -->

- [x] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [x] Add / update tests
- [ ] Add new / update outdated documentation

Use ESM import in module type webworker. <!-- Thank you for contributing to Pyodide! All improvements are welcome,
     so don't be afraid to make a PR. -->

<!-- [IMPORTANT] Note on CI failures:
     Currently, we are having issues with selenium-based tests.
     Don't panic if the CI fails on your PR because of timeouts.
     It's probably not your fault. We will investigate :) -->

### Description
The PR is to avoid `importScripts` error when loading pyodide in a module type worker. Currently `loadScripts`  uses `importScripts` to import dependency  which throws an error when the worker is of type `module`.

### Checklists

<!-- Note on checklists:
     If you think some of these steps are not necessary for your PR,
     just remove those checkboxes, or mark them as checked. Otherwise,
     if some checkboxes are left unmarked, we might assume that your PR
     is not ready to be merged and we might keep you waiting -->

- [x] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [x] Add / update tests
- [ ] Add new / update outdated documentation

# Pyodide Python package

A Python package providing core interpreter functionality for Pyodide.

This package is an integral part of the Pyodide runtime which cannot start
without it. Install in a native Python for type checking or testing purposes.
Some of the functionality is missing when imported in a native Python, but for
the APIs we either provide reimplementations or nonfunctional type stubs.

## License

Pyodide uses the [Mozilla Public License Version
2.0](https://choosealicense.com/licenses/mpl-2.0/).

## Design information for Pyodide contributors

This directory consists of two Python packages py/\_pyodide and py/pyodide. The
difference between these packages is when they are imported. They are both
imported by core/pyodide as a part of setting up the Pyodide/javascript foreign
function interface.

py/\_pyodide is imported as the first step after initializing
the CPython interpreter. py/\_pyodide cannot have any import time dependencies
other than the CPython stdlib.

py/pyodide is imported as the final step of core/pyodide. It has an import time
dependency on `_pyodide_core` which is a Python C extension assembled by
core/pyodide to serve the needs of py/pyodide.

# Pyodide Python package

A Python package providing core interpreter functionality for Pyodide.

This package is an integral part of the Pyodide runtime which cannot start
without it. Install in a native Python for type checking or testing purposes.
Some of the functionality is missing when imported in a native Python, but for
the APIs we either provide reimplementations or nonfunctional type stubs.

## License

Pyodide uses the [Mozilla Public License Version
2.0](https://choosealicense.com/licenses/mpl-2.0/).

## Design information for Pyodide contributors

This directory consists of two Python packages py/\_pyodide and py/pyodide. The
difference between these packages is when they are imported. They are both
imported by core/pyodide as a part of setting up the Pyodide/javascript foreign
function interface.

py/\_pyodide is imported as the first step after initializing
the CPython interpreter. py/\_pyodide cannot have any import time dependencies
other than the CPython stdlib.

py/pyodide is imported as the final step of core/pyodide. It has an import time
dependency on `_pyodide_core` which is a Python C extension assembled by
core/pyodide to serve the needs of py/pyodide.
