From b06663320e42d406db164f732fd776f3a046c755 Mon Sep 17 00:00:00 2001 From: Lidor Avitan <35113398+lidoravitan@users.noreply.github.com> Date: Thu, 4 Jul 2019 13:24:42 +0300 Subject: [PATCH] Update babel-preset-stage (0,1,2,3) readme files (#10111) [skip ci] * chore: update docs babel-preset-stage readme [ci skip] * fix: by PR request change [ci skip] --- packages/babel-preset-stage-0/README.md | 11 +++++++++-- packages/babel-preset-stage-1/README.md | 9 ++++++++- packages/babel-preset-stage-2/README.md | 9 ++++++++- packages/babel-preset-stage-3/README.md | 9 ++++++++- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/packages/babel-preset-stage-0/README.md b/packages/babel-preset-stage-0/README.md index e4cdd326b0..6826104889 100644 --- a/packages/babel-preset-stage-0/README.md +++ b/packages/babel-preset-stage-0/README.md @@ -32,7 +32,7 @@ If you want the same configuration as before: // Stage 3 "@babel/plugin-syntax-dynamic-import", "@babel/plugin-syntax-import-meta", - ["@babel/plugin-proposal-class-properties", { "loose": false }], + ["@babel/plugin-proposal-class-properties", { "loose": true }], "@babel/plugin-proposal-json-strings" ] } @@ -48,7 +48,7 @@ module.exports = function() { plugins: [ require("@babel/plugin-syntax-dynamic-import"), [require("@babel/plugin-proposal-decorators"), { "legacy": true }], - [require("@babel/plugin-proposal-class-properties"), { "loose": false }], + [require("@babel/plugin-proposal-class-properties"), { "loose": true }], ], presets: [ // ... @@ -56,3 +56,10 @@ module.exports = function() { }; }; ``` + +**NOTE: Compatibility between `@babel/plugin-proposal-class-properties` and `@babel/plugin-proposal-decorators`** +If you are including your plugins manually and using `@babel/plugin-proposal-class-properties`, make sure that `@babel/plugin-proposal-decorators` comes before `@babel/plugin-proposal-class-properties`. + +When using the `legacy: true` option of `@babel/plugin-proposal-decorators`, `@babel/plugin-proposal-class-properties` must be used in `loose: true` mode. + +If you are not using `@babel/plugin-proposal-decorators`, `loose` mode is not needed. \ No newline at end of file diff --git a/packages/babel-preset-stage-1/README.md b/packages/babel-preset-stage-1/README.md index 6cd8f47500..f8757e944a 100644 --- a/packages/babel-preset-stage-1/README.md +++ b/packages/babel-preset-stage-1/README.md @@ -29,7 +29,7 @@ If you want the same configuration as before: // Stage 3 "@babel/plugin-syntax-dynamic-import", "@babel/plugin-syntax-import-meta", - ["@babel/plugin-proposal-class-properties", { "loose": false }], + ["@babel/plugin-proposal-class-properties", { "loose": true }], "@babel/plugin-proposal-json-strings" ] } @@ -53,3 +53,10 @@ module.exports = function() { }; }; ``` + +**NOTE: Compatibility between `@babel/plugin-proposal-class-properties` and `@babel/plugin-proposal-decorators`** +If you are including your plugins manually and using `@babel/plugin-proposal-class-properties`, make sure that `@babel/plugin-proposal-decorators` comes before `@babel/plugin-proposal-class-properties`. + +When using the `legacy: true` option of `@babel/plugin-proposal-decorators`, `@babel/plugin-proposal-class-properties` must be used in `loose: true` mode. + +If you are not using `@babel/plugin-proposal-decorators`, `loose` mode is not needed. \ No newline at end of file diff --git a/packages/babel-preset-stage-2/README.md b/packages/babel-preset-stage-2/README.md index f1f9abfebf..920801e000 100644 --- a/packages/babel-preset-stage-2/README.md +++ b/packages/babel-preset-stage-2/README.md @@ -21,7 +21,7 @@ If you want the same configuration as before: // Stage 3 "@babel/plugin-syntax-dynamic-import", "@babel/plugin-syntax-import-meta", - ["@babel/plugin-proposal-class-properties", { "loose": false }], + ["@babel/plugin-proposal-class-properties", { "loose": true }], "@babel/plugin-proposal-json-strings" ] } @@ -45,3 +45,10 @@ module.exports = function() { }; }; ``` + +**NOTE: Compatibility between `@babel/plugin-proposal-class-properties` and `@babel/plugin-proposal-decorators`** +If you are including your plugins manually and using `@babel/plugin-proposal-class-properties`, make sure that `@babel/plugin-proposal-decorators` comes before `@babel/plugin-proposal-class-properties`. + +When using the `legacy: true` option of `@babel/plugin-proposal-decorators`, `@babel/plugin-proposal-class-properties` must be used in `loose: true` mode. + +If you are not using `@babel/plugin-proposal-decorators`, `loose` mode is not needed. \ No newline at end of file diff --git a/packages/babel-preset-stage-3/README.md b/packages/babel-preset-stage-3/README.md index cf6e28c258..33ec721e30 100644 --- a/packages/babel-preset-stage-3/README.md +++ b/packages/babel-preset-stage-3/README.md @@ -29,7 +29,7 @@ module.exports = function() { plugins: [ require("@babel/plugin-syntax-dynamic-import"), [require("@babel/plugin-proposal-decorators"), { "legacy": true }], - [require("@babel/plugin-proposal-class-properties"), { "loose": false }], + [require("@babel/plugin-proposal-class-properties"), { "loose": true }], ], presets: [ // ... @@ -37,3 +37,10 @@ module.exports = function() { }; }; ``` + +**NOTE: Compatibility between `@babel/plugin-proposal-class-properties` and `@babel/plugin-proposal-decorators`** +If you are including your plugins manually and using `@babel/plugin-proposal-class-properties`, make sure that `@babel/plugin-proposal-decorators` comes before `@babel/plugin-proposal-class-properties`. + +When using the `legacy: true` option of `@babel/plugin-proposal-decorators`, `@babel/plugin-proposal-class-properties` must be used in `loose: true` mode. + +If you are not using `@babel/plugin-proposal-decorators`, `loose` mode is not needed. \ No newline at end of file