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]
This commit is contained in:
parent
d50e78d45b
commit
b06663320e
@ -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.
|
||||
@ -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.
|
||||
@ -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.
|
||||
@ -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.
|
||||
Loading…
x
Reference in New Issue
Block a user