You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,9 +57,9 @@ The following options are available when running the Babel plugin:
57
57
58
58
-**`removeImport`**— If `true`, removes any import declarations with module name `'regex'`.
59
59
-**`disableUnicodeSets`**— If `true`, adds `regex` option `disable: {v: true}` to all regexes before transformation.
60
+
-**`headerComment`**— If given a value, it will be added in a comment at the top of processed output/files.
60
61
-**`optimize`** (*experimental*) — If `true`, attempts to further optimize the regex source generated by `regex`.
61
62
- Uses an external library ([regexp-tree](https://github.com/DmitrySoshnikov/regexp-tree)'s optimizer) that doesn't support flag-<kbd>v</kbd>-only syntax and isn't fully context-aware, so you should check the output.
62
-
-**`headerComment`**— If given a value, it will be added in a comment at the top of processed output/files.
63
63
64
64
## Compatibility
65
65
@@ -79,7 +79,7 @@ There are several ways to address this:
79
79
- This maintains 100% parity between code running with or without the Babel plugin.
80
80
- This doesn't support the use of <kbd>v</kbd>-only syntax.
81
81
82
-
You can try all these options in the [demo REPL](https://slevithan.github.io/babel-plugin-transform-regex/demo/).
82
+
You can try all of these options in the [demo REPL](https://slevithan.github.io/babel-plugin-transform-regex/demo/).
83
83
84
84
## Installation and usage
85
85
@@ -113,6 +113,8 @@ Or to set plugin options:
113
113
}
114
114
```
115
115
116
+
> If you're using TypeScript, also add [@babel/plugin-syntax-typescript](https://babeljs.io/docs/babel-plugin-syntax-typescript).
117
+
116
118
Then add a script to your `package.json` to run the build:
0 commit comments