feat: set package build target to es2017 (#4341)

This commit is contained in:
David Luzar 2021-12-07 16:38:46 +01:00 committed by GitHub
parent 9b8ee3cacf
commit dfbfbc3f11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -66,6 +66,10 @@ Please add the latest change on the top under the correct section.
The `Appearance` type is now removed and renamed to `Theme` so `Theme` type needs to be used. The `Appearance` type is now removed and renamed to `Theme` so `Theme` type needs to be used.
### Build
- We're now compiling to `es2017` target. Notably, `async/await` is not compiled down to generators. [#4341](https://github.com/excalidraw/excalidraw/pull/4341)
--- ---
## 0.10.0 (2021-10-13) ## 0.10.0 (2021-10-13)

View File

@ -72,7 +72,7 @@
"homepage": "https://github.com/excalidraw/excalidraw/tree/master/src/packages/excalidraw", "homepage": "https://github.com/excalidraw/excalidraw/tree/master/src/packages/excalidraw",
"scripts": { "scripts": {
"gen:types": "tsc --project ../../../tsconfig-types.json", "gen:types": "tsc --project ../../../tsconfig-types.json",
"build:umd": "cross-env NODE_ENV=production webpack --config webpack.prod.config.js && cross-env NODE_ENV=development webpack --config webpack.dev.config.js && yarn gen:types", "build:umd": "rm -rf dist && cross-env NODE_ENV=production webpack --config webpack.prod.config.js && cross-env NODE_ENV=development webpack --config webpack.dev.config.js && yarn gen:types",
"build:umd:withAnalyzer": "cross-env NODE_ENV=production ANALYZER=true webpack --config webpack.prod.config.js", "build:umd:withAnalyzer": "cross-env NODE_ENV=production ANALYZER=true webpack --config webpack.prod.config.js",
"pack": "yarn build:umd && yarn pack" "pack": "yarn build:umd && yarn pack"
}, },

View File

@ -63,10 +63,7 @@ module.exports = {
"@babel/preset-typescript", "@babel/preset-typescript",
], ],
plugins: [ plugins: [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-arrow-functions",
"transform-class-properties", "transform-class-properties",
"@babel/plugin-transform-async-to-generator",
"@babel/plugin-transform-runtime", "@babel/plugin-transform-runtime",
], ],
}, },

View File

@ -1,6 +1,6 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es2017",
"module": "es2015", "module": "es2015",
"moduleResolution": "node", "moduleResolution": "node",
"resolveJsonModule": true, "resolveJsonModule": true,