Skip to content

Commit

Permalink
Declare matrix-js-sdk as an ES module (#4285)
Browse files Browse the repository at this point in the history
* Declare matrix-js-sdk as an ES module

* Rename `babel.config.js` to show it is a CommonJS module

... otherwise it gets broken by `scripts/switch_package_to_release.js`
  • Loading branch information
richvdh authored Jun 26, 2024
1 parent 0210106 commit d629a68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
File renamed without changes.
5 changes: 5 additions & 0 deletions scripts/switch_package_to_release.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ async function main() {
pkgJson[field] = pkgJson["matrix_lib_" + field];
}
}

// matrix-js-sdk is built into ECMAScript modules. Make sure we declare it as such.
// See https://nodejs.org/api/packages.html#type.
pkgJson["type"] = "module";

await fsProm.writeFile(PKGJSON, JSON.stringify(pkgJson, null, 2));
}

Expand Down

0 comments on commit d629a68

Please sign in to comment.