From 8556ffe3c59952d7e64565422bf433699e97756e Mon Sep 17 00:00:00 2001 From: Alec Larson <1925840+aleclarson@users.noreply.github.com> Date: Mon, 25 Oct 2021 20:15:00 -0400 Subject: [PATCH] fix(plugin-react): avoid mangling the sourcemaps of virtual modules (#5421) --- packages/plugin-react/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/plugin-react/src/index.ts b/packages/plugin-react/src/index.ts index b53ed9121fb9e6..ad0e24366d61d4 100644 --- a/packages/plugin-react/src/index.ts +++ b/packages/plugin-react/src/index.ts @@ -199,6 +199,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] { ast: !isReasonReact, root: projectRoot, filename: id, + sourceFileName: id, parserOpts: { ...opts.babel?.parserOpts, sourceType: 'module',