This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 827
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to babel@7 and support TypeScript
For element-hq/element-web#10524 Upgrading to babel 7 gets a lot of the compilation stuff for free. The major changes we care about are: * The packages are now namespaced (hence all the package changes) * We use the `env` preset instead of the long-since deprecated es20XX packages. * Added `--verbose` to maintain log output from the previous version. This also meant fixing `ScalarAuthClient`: we can no longer mix `module.exports` and `import` in the same file. The SdkConfig was converted to TypeScript to prove this works (it does).
- Loading branch information
Showing
6 changed files
with
947 additions
and
1,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
{ | ||
"presets": [ | ||
"react", | ||
"es2015", | ||
"es2016" | ||
"@babel/preset-react", | ||
["@babel/preset-env", { | ||
"targets": {"browsers": ["last 2 versions"]} | ||
}], | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": [ | ||
[ | ||
"transform-builtin-extend", | ||
{ | ||
"globals": ["Error"] | ||
} | ||
], | ||
"transform-class-properties", | ||
"transform-object-rest-spread", | ||
"transform-async-to-bluebird", | ||
"transform-runtime", | ||
"add-module-exports", | ||
"syntax-dynamic-import" | ||
"babel-plugin-add-module-exports", | ||
"@babel/plugin-proposal-numeric-separator", | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-proposal-object-rest-spread", | ||
"@babel/plugin-transform-flow-comments", | ||
"@babel/plugin-transform-async-to-generator", | ||
"@babel/plugin-transform-runtime", | ||
"@babel/plugin-syntax-dynamic-import" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"moduleResolution": "node", | ||
"allowJs": true, | ||
"noEmit": false, | ||
"strict": false, | ||
"isolatedModules": true, | ||
"esModuleInterop": true | ||
}, | ||
"include": [ | ||
"src/*.ts", | ||
"src/**/*.ts" | ||
] | ||
} |
Oops, something went wrong.