mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 19:46:57 +02:00
chore(v2): Adopt corejs 3 and only import at entry point (#3055)
This commit is contained in:
parent
f947036595
commit
7660005db8
4 changed files with 13 additions and 4 deletions
|
@ -25,8 +25,8 @@ function getSWBabelLoader() {
|
|||
[
|
||||
require.resolve('@babel/preset-env'),
|
||||
{
|
||||
useBuiltIns: 'usage',
|
||||
corejs: '2',
|
||||
useBuiltIns: 'entry',
|
||||
corejs: '3',
|
||||
// See https://twitter.com/jeffposnick/status/1280223070876315649
|
||||
targets: 'chrome >= 56',
|
||||
},
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
"@babel/preset-react": "^7.9.4",
|
||||
"@babel/preset-typescript": "^7.9.0",
|
||||
"@babel/runtime": "^7.9.2",
|
||||
"@babel/runtime-corejs3": "^7.10.4",
|
||||
"@docusaurus/types": "^2.0.0-alpha.58",
|
||||
"@docusaurus/utils": "^2.0.0-alpha.58",
|
||||
"@endiliey/static-site-generator-webpack-plugin": "^4.0.0",
|
||||
|
|
|
@ -27,9 +27,9 @@ function getTransformOptions(isServer: boolean): TransformOptions {
|
|||
: [
|
||||
require.resolve('@babel/preset-env'),
|
||||
{
|
||||
useBuiltIns: 'usage',
|
||||
useBuiltIns: 'entry',
|
||||
loose: true,
|
||||
corejs: '2',
|
||||
corejs: '3',
|
||||
// Do not transform modules to CJS
|
||||
modules: false,
|
||||
// Exclude transforms that make all code slower
|
||||
|
|
|
@ -1163,6 +1163,14 @@
|
|||
pirates "^4.0.0"
|
||||
source-map-support "^0.5.16"
|
||||
|
||||
"@babel/runtime-corejs3@^7.10.4":
|
||||
version "7.10.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.10.4.tgz#f29fc1990307c4c57b10dbd6ce667b27159d9e0d"
|
||||
integrity sha512-BFlgP2SoLO9HJX9WBwN67gHWMBhDX/eDz64Jajd6mR/UAUzqrNMm99d4qHnVaKscAElZoFiPv+JpR/Siud5lXw==
|
||||
dependencies:
|
||||
core-js-pure "^3.0.0"
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/runtime-corejs3@^7.7.4":
|
||||
version "7.7.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.7.7.tgz#78fcbd472daec13abc42678bfc319e58a62235a3"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue