From a55e8df74ecf636274a575fad4102cab05c5b9b1 Mon Sep 17 00:00:00 2001 From: Mark Dalgleish Date: Tue, 16 Apr 2024 14:18:17 +1000 Subject: [PATCH] Ignore Babel config for `react-refresh` transform --- .changeset/tame-otters-clap.md | 5 +++++ packages/remix-dev/vite/plugin.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/tame-otters-clap.md diff --git a/.changeset/tame-otters-clap.md b/.changeset/tame-otters-clap.md new file mode 100644 index 00000000000..10d678ead9e --- /dev/null +++ b/.changeset/tame-otters-clap.md @@ -0,0 +1,5 @@ +--- +"@remix-run/dev": patch +--- + +Ensure Babel config files are not referenced when applying the `react-refresh` Babel transform within the Remix Vite plugin diff --git a/packages/remix-dev/vite/plugin.ts b/packages/remix-dev/vite/plugin.ts index 2160bcf7edf..0319e374593 100644 --- a/packages/remix-dev/vite/plugin.ts +++ b/packages/remix-dev/vite/plugin.ts @@ -1700,6 +1700,8 @@ export const remixVitePlugin: RemixVitePlugin = (remixUserConfig = {}) => { } let result = await babel.transformAsync(code, { + configFile: false, + babelrc: false, filename: id, sourceFileName: filepath, parserOpts: {