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