From 2b30426344b70432a3751c891617bf24f8098c06 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Thu, 17 Aug 2023 16:35:39 +0200 Subject: [PATCH] remove check that breaks fast refresh --- incubator/polyfills/src/index.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) 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%%;`);