Fix plugin source maps in dev mode

Summary:
Start bundling source maps together with the source code itself in the dev mode. Therefore it is no longer required to add a link to the external source map file in dev mode.
In prod mode we still ship them separately.

Reviewed By: mweststrate

Differential Revision: D39775064

fbshipit-source-id: 6c56df7a3fce084c07a8618a63dbd8ae4741348c
This commit is contained in:
Andrey Goncharov
2022-09-26 06:54:03 -07:00
committed by Facebook GitHub Bot
parent 6f65517933
commit 982193df48
2 changed files with 6 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ async function runBuild({
// It is an optional dependency for rollup that we use in react-devtools
'fsevents',
],
sourcemap: 'external',
sourcemap: dev ? 'inline' : 'external',
minify: !dev,
plugins: intern ? [resolveFbStubsToFbPlugin] : undefined,
});