Use `babel` plugin replace `includes` (#6659)

master
fisker Cheung 2019-10-15 19:48:56 +08:00 committed by Lipis
parent aa4c1cad5b
commit c949f5ba20
1 changed files with 3 additions and 4 deletions

View File

@ -39,10 +39,9 @@ const parsers = [
{
input: "src/language-js/parser-typescript.js",
target: "universal",
replace: {
// node v4 compatibility for @typescript-eslint/typescript-estree
"(!unique.includes(raw))": "(unique.indexOf(raw) === -1)"
},
babelPlugins: [
require.resolve("./babel-plugins/replace-array-includes-with-indexof")
],
commonjs: {
ignore: [
// Optional package for TypeScript that logs ETW events (a Windows-only technology).