Skip to content

Commit d629a68

Browse files
authored
Declare matrix-js-sdk as an ES module (#4285)
* 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`
1 parent 0210106 commit d629a68

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
File renamed without changes.

scripts/switch_package_to_release.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ async function main() {
1111
pkgJson[field] = pkgJson["matrix_lib_" + field];
1212
}
1313
}
14+
15+
// matrix-js-sdk is built into ECMAScript modules. Make sure we declare it as such.
16+
// See https://nodejs.org/api/packages.html#type.
17+
pkgJson["type"] = "module";
18+
1419
await fsProm.writeFile(PKGJSON, JSON.stringify(pkgJson, null, 2));
1520
}
1621

0 commit comments

Comments
 (0)