We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58497e1 commit c5e5f58Copy full SHA for c5e5f58
packages/babel/src/bundledHelpersPlugin.js
@@ -2,7 +2,7 @@ import { addNamed } from '@babel/helper-module-imports';
2
3
import { HELPERS } from './constants';
4
5
-export default function importHelperPlugin() {
+export default function importHelperPlugin({ types: t }) {
6
return {
7
pre(file) {
8
const cachedHelpers = {};
@@ -12,7 +12,7 @@ export default function importHelperPlugin() {
12
}
13
14
if (cachedHelpers[name]) {
15
- return cachedHelpers[name];
+ return t.cloneNode(cachedHelpers[name]);
16
17
18
return (cachedHelpers[name] = addNamed(file.path, name, HELPERS));
0 commit comments