Skip to content

Commit

Permalink
remove check that breaks fast refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 committed Aug 31, 2023
1 parent a0e8a77 commit 13ecde9
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions incubator/polyfills/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 ?? "<unnamed module>";

const polyfills = getDependencyPolyfills({ projectRoot: context.cwd });
const importPolyfill = babelTemplate(`import %%source%%;`);

Expand Down

0 comments on commit 13ecde9

Please sign in to comment.