Skip to content

[mozjs68] Reorganize modules for ESM.

Evan Welsh requested to merge ewlsh/gjs:esm-reorganize into master

This merge request reorganizes the module file structure to support ESM. See #314 (moved)

Changes:

  1. Move the module gresource bundle to the project root.
  2. Move "script-based" modules into a separate sub-directory (script)
  3. Move shared code into a separate sub-directory (core)

When ESM is merged it will add a third directory (esm) for its code.

1 is necessary as ESM will also add JavaScript files in gjs/ which are run internally. We need the resource file to support the gjs/ path.

2 and 3 are necessary as both import systems are file-system based, and attempting to import each others' code should not be possible.

Merge request reports