Move parser plugin from babel-preset-typescript to babel-plugin-syntax-typescript (#6070)
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
export default function() {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("typescript");
|
||||
parserOpts.plugins.push(
|
||||
"typescript",
|
||||
"objectRestSpread",
|
||||
"classProperties",
|
||||
);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
This preset includes the following plugins:
|
||||
|
||||
- [transform-typescript](https://babeljs.io/docs/plugins/transform-typescript/)
|
||||
- [syntax-object-rest-spread](https://babeljs.io/docs/plugins/syntax-object-rest-spread/)
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
"typescript"
|
||||
],
|
||||
"dependencies": {
|
||||
"babel-plugin-syntax-object-rest-spread": "7.0.0-alpha.19",
|
||||
"babel-plugin-transform-typescript": "7.0.0-alpha.19"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import transformTypeScript from "babel-plugin-transform-typescript";
|
||||
import syntaxObjectRestSpread from "babel-plugin-syntax-object-rest-spread";
|
||||
|
||||
export default function() {
|
||||
return {
|
||||
plugins: [transformTypeScript, syntaxObjectRestSpread],
|
||||
plugins: [transformTypeScript],
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user