| 1 | import defineHelper from "../../../helpers/define-helper.js"; |
| 2 | |
| 3 | const main = defineHelper(import.meta.url, "main", ` |
| 4 | export default function helper() {} |
| 5 | `); |
| 6 | |
| 7 | export default function() { |
| 8 | return { |
| 9 | visitor: { |
| 10 | Identifier(path) { |
| 11 | if (path.node.name !== "REPLACE_ME") { |
| 12 | if (path.hub) { |
| 13 | path.node.name += "_hub_is_found"; |
| 14 | } |
| 15 | return; |
| 16 | } |
| 17 | const helper = this.addHelper(main); |
| 18 | path.replaceWith(helper); |
| 19 | }, |
| 20 | }, |
| 21 | }; |
| 22 | }; |