diff --git a/incubator/polyfills/src/index.ts b/incubator/polyfills/src/index.ts index a61a267d42..395e8db1f4 100644 --- a/incubator/polyfills/src/index.ts +++ b/incubator/polyfills/src/index.ts @@ -6,13 +6,8 @@ import { getDependencyPolyfills } from "./dependency"; module.exports = declare((api: ConfigAPI) => { api.assertVersion(7); - - const pluginName = "@react-native-webapis/polyfills"; - - let isPolyfilled: string | null = null; - return { - name: pluginName, + name: "@rnx-kit/polyfills", visitor: { Program: (path, context) => { const leadingComments = path.node.body[0]?.leadingComments; @@ -25,14 +20,6 @@ module.exports = declare((api: ConfigAPI) => { return; } - if (isPolyfilled != null) { - throw new Error( - `'${pluginName}' is already applied to ${isPolyfilled}` - ); - } - - isPolyfilled = context.file.opts.filename ?? ""; - const polyfills = getDependencyPolyfills({ projectRoot: context.cwd }); const importPolyfill = babelTemplate(`import %%source%%;`);