diff --git a/package.json b/package.json index 075d821ec9a..29624b30b0a 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "keywords": [ "matrix-org" ], + "type": "module", "main": "./src/index.ts", "browser": "./src/browser-index.ts", "matrix_src_main": "./src/index.ts", diff --git a/scripts/release/pre-release.sh b/scripts/release/pre-release.sh index 19319fb6105..6b47ef180ff 100755 --- a/scripts/release/pre-release.sh +++ b/scripts/release/pre-release.sh @@ -12,6 +12,3 @@ do jq ".$i = .matrix_lib_$i" package.json > package.json.new && mv package.json.new package.json && yarn prettier --write package.json fi done - -# Ensure that "type": "module" is present -jq '.type = "module"' package.json > package.json.new && mv package.json.new package.json && yarn prettier --write package.json diff --git a/scripts/switch_package_to_release.cjs b/scripts/switch_package_to_release.cjs index 353840d4d92..6d857a4070a 100755 --- a/scripts/switch_package_to_release.cjs +++ b/scripts/switch_package_to_release.cjs @@ -12,10 +12,6 @@ async function main() { } } - // 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)); }