Mirror: The small sibling of the graphql package, slimmed down for client-side libraries.
1const plugin = ({ types: t }) => {
2 return {
3 visitor: {
4 ClassMethod(path) {
5 if (
6 path.node.kind === 'get' &&
7 path.node.computed &&
8 t.isMemberExpression(path.node.key) &&
9 t.isIdentifier(path.node.key.object) &&
10 t.isIdentifier(path.node.key.property) &&
11 path.node.key.object.name === 'Symbol' &&
12 path.node.key.property.name === 'toStringTag'
13 ) {
14 path.remove();
15 }
16 },
17 },
18 };
19};
20
21export default plugin;