diff --git a/babel.config.js b/babel.config.cjs similarity index 100% rename from babel.config.js rename to babel.config.cjs diff --git a/scripts/switch_package_to_release.js b/scripts/switch_package_to_release.js index 2ef9bb09cb2..353840d4d92 100755 --- a/scripts/switch_package_to_release.js +++ b/scripts/switch_package_to_release.js @@ -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)); }