From f4a6b38407b0421142c49173412543dc91292505 Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Mon, 24 May 2021 19:34:23 +0200 Subject: [PATCH] chore(pkg): build for es2019 target (#9328) [release] --- package.json | 2 ++ scripts/rollup.config.js | 2 ++ yarn.lock | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/package.json b/package.json index bfcf67372b..a77b271c2b 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "consola": "^2.15.3", "create-require": "^1.1.1", "cross-spawn": "^7.0.3", + "esbuild": "^0.12.1", "eslint": "^7.26.0", "eslint-multiplexer": "^2.0.0", "execa": "^5.0.0", @@ -75,6 +76,7 @@ "request": "^2.88.2", "rimraf": "^3.0.2", "rollup": "2.48.0", + "rollup-plugin-esbuild": "^4.2.3", "rollup-plugin-license": "^2.3.0", "sass": "^1.32.13", "sass-loader": "^10.1.1", diff --git a/scripts/rollup.config.js b/scripts/rollup.config.js index 4e194d0c61..33213a90ac 100644 --- a/scripts/rollup.config.js +++ b/scripts/rollup.config.js @@ -6,6 +6,7 @@ import replacePlugin from '@rollup/plugin-replace' import aliasPlugin from '@rollup/plugin-alias' // import nodeResolvePlugin from '@rollup/plugin-node-resolve' import licensePlugin from 'rollup-plugin-license' +import esbuild from 'rollup-plugin-esbuild' import { defaultsDeep } from 'lodash' export default function rollupConfig ({ @@ -50,6 +51,7 @@ export default function rollupConfig ({ // /lodash/ // ] // }), + esbuild({ target: 'es2019' }), commonjsPlugin({ include: /node_modules/ }), jsonPlugin(), licensePlugin({ diff --git a/yarn.lock b/yarn.lock index 1e75506a17..ec82a792e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2282,6 +2282,14 @@ estree-walker "^1.0.1" picomatch "^2.2.2" +"@rollup/pluginutils@^4.1.0": + version "4.1.0" + resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.0.tgz#0dcc61c780e39257554feb7f77207dceca13c838" + integrity sha512-TrBhfJkFxA+ER+ew2U2/fHbebhLT/l/2pRk0hfj9KusXUuRXd2v0R58AfaZK9VXDQ4TogOSEmICVrQAA3zFnHQ== + dependencies: + estree-walker "^2.0.1" + picomatch "^2.2.2" + "@sindresorhus/is@^4.0.0": version "4.0.1" resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz#d26729db850fa327b7cacc5522252194404226f5" @@ -5639,6 +5647,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +esbuild@^0.12.1: + version "0.12.1" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.12.1.tgz#f652d5b3b9432dbb42fc2c034ddd62360296e03d" + integrity sha512-WfQ00MKm/Y4ysz1u9PCUAsV66k5lbrcEvS6aG9jhBIavpB94FBdaWeBkaZXxCZB4w+oqh+j4ozJFWnnFprOXbg== + escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -8128,6 +8141,11 @@ jiti@^1.9.2: resolved "https://registry.npmjs.org/jiti/-/jiti-1.9.2.tgz#2ee44830883dbb1b2e222adc053c3052d0bf3b61" integrity sha512-wymUBR/YGGVNVRAxX52yvFoZdUAYKEGjk0sYrz6gXLCvMblnRvJAmDUnMvQiH4tUHDBtbKHnZ4GT3R+m3Hc39A== +joycon@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/joycon/-/joycon-3.0.1.tgz#9074c9b08ccf37a6726ff74a18485f85efcaddaf" + integrity sha512-SJcJNBg32dGgxhPtM0wQqxqV0ax9k/9TaUskGDSJkSFSQOEWWvQ3zzWdGQRIUry2j1zA5+ReH13t0Mf3StuVZA== + js-beautify@^1.6.12: version "1.13.13" resolved "https://registry.npmjs.org/js-beautify/-/js-beautify-1.13.13.tgz#756907d1728f329f2b84c42efd56ad17514620bf" @@ -8253,6 +8271,11 @@ json5@^2.1.2: dependencies: minimist "^1.2.5" +jsonc-parser@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" + integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -11604,6 +11627,15 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rollup-plugin-esbuild@^4.2.3: + version "4.2.3" + resolved "https://registry.npmjs.org/rollup-plugin-esbuild/-/rollup-plugin-esbuild-4.2.3.tgz#3d719e58e7a5f84515fe52a58d35bc97a9e7e12c" + integrity sha512-GWyDUPv79Iw4uQdizD7ch7yA+wiB9W4Ye01RmO/kuF3yjybluJT5rbmLAnyv3kWmOF8suOjf+TvvBCXEj6qSAw== + dependencies: + "@rollup/pluginutils" "^4.1.0" + joycon "^3.0.1" + jsonc-parser "^3.0.0" + rollup-plugin-license@^2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-2.3.0.tgz#fc8711c5e0f5850bda2908751c718f45b0315bee"