packages/babel-plugin-proposal-unicode-sets-regex/src/index.ts
raw| 1 | /* eslint-disable @babel/development/plugin-name */ |
| 2 | import { createRegExpFeaturePlugin } from "@babel/helper-create-regexp-features-plugin"; |
| 3 | import { declare } from "@babel/helper-plugin-utils"; |
| 4 | |
| 5 | export default declare(api => { |
| 6 | api.assertVersion(7); |
| 7 | |
| 8 | return createRegExpFeaturePlugin({ |
| 9 | name: "transform-unicode-sets-regex", |
| 10 | feature: "unicodeSetsFlag", |
| 11 | manipulateOptions(opts, parserOpts) { |
| 12 | parserOpts.plugins.push("regexpUnicodeSets"); |
| 13 | }, |
| 14 | }); |
| 15 | }); |