-
Notifications
You must be signed in to change notification settings - Fork 46.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add source maps #21946
Add source maps #21946
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,10 @@ | |
"@babel/preset-react": "^7.10.4", | ||
"@babel/traverse": "^7.11.0", | ||
"@mattiasbuelens/web-streams-polyfill": "^0.3.2", | ||
"@rollup/plugin-replace": "^2.4.2", | ||
"@rollup/plugin-commonjs": "19.0.1", | ||
"@rollup/plugin-node-resolve": "^13.0.1", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"abort-controller": "^3.0.0", | ||
"art": "0.10.1", | ||
"babel-eslint": "^10.0.3", | ||
|
@@ -83,13 +87,10 @@ | |
"random-seed": "^0.3.0", | ||
"react-lifecycles-compat": "^3.0.4", | ||
"rimraf": "^3.0.0", | ||
"rollup": "^1.19.4", | ||
"rollup-plugin-babel": "^4.0.1", | ||
"rollup-plugin-commonjs": "^9.3.4", | ||
"rollup-plugin-node-resolve": "^2.1.1", | ||
"rollup-plugin-prettier": "^0.6.0", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-strip-banner": "^0.2.0", | ||
"rollup": "^2.53.2", | ||
"rollup-plugin-prettier": "^2.1.0", | ||
"rollup-plugin-strip-banner": "^2.0.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
Comment on lines
+90
to
+93
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest versions: |
||
"semver": "^7.1.1", | ||
"targz": "^1.0.1", | ||
"through2": "^3.0.1", | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -1,15 +1,15 @@ | ||||||||||
'use strict'; | ||||||||||
|
||||||||||
const rollup = require('rollup'); | ||||||||||
const babel = require('rollup-plugin-babel'); | ||||||||||
const babel = require('@rollup/plugin-babel').babel; | ||||||||||
const closure = require('./plugins/closure-plugin'); | ||||||||||
const commonjs = require('rollup-plugin-commonjs'); | ||||||||||
const commonjs = require('@rollup/plugin-commonjs'); | ||||||||||
const prettier = require('rollup-plugin-prettier'); | ||||||||||
const replace = require('rollup-plugin-replace'); | ||||||||||
const replace = require('@rollup/plugin-replace'); | ||||||||||
const stripBanner = require('rollup-plugin-strip-banner'); | ||||||||||
const chalk = require('chalk'); | ||||||||||
const path = require('path'); | ||||||||||
const resolve = require('rollup-plugin-node-resolve'); | ||||||||||
const resolve = require('@rollup/plugin-node-resolve').nodeResolve; | ||||||||||
const fs = require('fs'); | ||||||||||
const argv = require('minimist')(process.argv.slice(2)); | ||||||||||
const Modules = require('./modules'); | ||||||||||
|
@@ -19,6 +19,7 @@ const Sync = require('./sync'); | |||||||||
const sizes = require('./plugins/sizes-plugin'); | ||||||||||
const useForks = require('./plugins/use-forks-plugin'); | ||||||||||
const stripUnusedImports = require('./plugins/strip-unused-imports'); | ||||||||||
const terser = require('rollup-plugin-terser').terser; | ||||||||||
const extractErrorCodes = require('../error-codes/extract-errors'); | ||||||||||
const Packaging = require('./packaging'); | ||||||||||
const {asyncRimRaf} = require('./utils'); | ||||||||||
|
@@ -155,8 +156,10 @@ function getBabelConfig( | |||||||||
packageName === 'react' || externals.indexOf('react') !== -1; | ||||||||||
let options = { | ||||||||||
exclude: '/**/node_modules/**', | ||||||||||
babelHelpers: 'bundled', | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||
babelrc: false, | ||||||||||
configFile: false, | ||||||||||
sourceMaps: true, | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like So we probably don't need to add this (unless it's also going to other plugins that don't set it by default?)
Suggested change
|
||||||||||
presets: [], | ||||||||||
plugins: [...babelPlugins], | ||||||||||
}; | ||||||||||
|
@@ -224,7 +227,8 @@ function getRollupOutputOptions( | |||||||||
format, | ||||||||||
globals, | ||||||||||
globalName, | ||||||||||
bundleType | ||||||||||
bundleType, | ||||||||||
isPretty | ||||||||||
) { | ||||||||||
const isProduction = isProductionBundleType(bundleType); | ||||||||||
|
||||||||||
|
@@ -235,7 +239,7 @@ function getRollupOutputOptions( | |||||||||
freeze: !isProduction, | ||||||||||
interop: false, | ||||||||||
name: globalName, | ||||||||||
sourcemap: false, | ||||||||||
sourcemap: !isPretty, | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As mentioned in another comment in this review, I think maybe we should be using
Suggested change
|
||||||||||
esModule: false, | ||||||||||
}; | ||||||||||
} | ||||||||||
|
@@ -364,26 +368,38 @@ function getPlugins( | |||||||||
bundleType === RN_FB_PROFILING; | ||||||||||
const shouldStayReadable = isFBWWWBundle || isRNBundle || forcePrettyOutput; | ||||||||||
return [ | ||||||||||
// Extract error codes from invariant() messages into a file. | ||||||||||
// // Extract error codes from invariant() messages into a file. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There seem to be a bunch of places where the comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
shouldExtractErrors && { | ||||||||||
transform(source) { | ||||||||||
findAndRecordErrorCodes(source); | ||||||||||
return source; | ||||||||||
}, | ||||||||||
}, | ||||||||||
// Shim any modules that need forking in this environment. | ||||||||||
// // Turn __DEV__ and process.env checks into constants. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
replace({ | ||||||||||
preventAssignment: true, | ||||||||||
values: { | ||||||||||
__DEV__: isProduction ? 'false' : 'true', | ||||||||||
__PROFILE__: isProfiling || !isProduction ? 'true' : 'false', | ||||||||||
__UMD__: isUMDBundle ? 'true' : 'false', | ||||||||||
'process.env.NODE_ENV': isProduction ? "'production'" : "'development'", | ||||||||||
__EXPERIMENTAL__, | ||||||||||
// Enable forked reconciler. | ||||||||||
// NOTE: I did not put much thought into how to configure this. | ||||||||||
__VARIANT__: bundle.enableNewReconciler === true, | ||||||||||
}, | ||||||||||
}), | ||||||||||
Comment on lines
+378
to
+391
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious, why was this moved earlier in the chain of things? (originally down around line 402-412) I suspect that this may be incorrect, as now it is being run before Comparing the diff, the main changes seem to be the addition of New lib:
Old lib:
|
||||||||||
// // Shim any modules that need forking in this environment. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
useForks(forks), | ||||||||||
// Ensure we don't try to bundle any fbjs modules. | ||||||||||
// // Ensure we don't try to bundle any fbjs modules. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
forbidFBJSImports(), | ||||||||||
// Use Node resolution mechanism. | ||||||||||
resolve({ | ||||||||||
skip: externals, | ||||||||||
}), | ||||||||||
// Remove license headers from individual modules | ||||||||||
// // Use Node resolution mechanism. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
resolve(), | ||||||||||
Comment on lines
-378
to
+397
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was It looks like the old version of the library removed it in
Looking at the options for the new library, these are the parts that seem potentially relevant: |
||||||||||
// // Remove license headers from individual modules | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
stripBanner({ | ||||||||||
exclude: 'node_modules/**/*', | ||||||||||
}), | ||||||||||
// Compile to ES2015. | ||||||||||
// // Compile to ES2015. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
babel( | ||||||||||
getBabelConfig( | ||||||||||
updateBabelOptions, | ||||||||||
|
@@ -393,61 +409,39 @@ function getPlugins( | |||||||||
!isProduction | ||||||||||
) | ||||||||||
), | ||||||||||
// Remove 'use strict' from individual source files. | ||||||||||
{ | ||||||||||
transform(source) { | ||||||||||
return source.replace(/['"]use strict["']/g, ''); | ||||||||||
}, | ||||||||||
}, | ||||||||||
Comment on lines
-396
to
-401
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was presumably replaced with the
I believe the removed code stripped
My assumption is that this
Looking at the Presumably this was done prior to the I would have to check out and build the react code to be certain, but my guess is that leaving everything else the same as it currently is in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's still needed, we might be able to get this functionality back in a 'sourcemap compatible' way by using The regular expression
So I think a call like this would probably manage it (or include these in the existing call to it): replace({
'\'use strict\'': '',
'"use strict"': '',
}) Some consideration of the word boundary regex may be required also, since i'm not sure if it will currently match against the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See also my comments elsewhere in this review (ref) that talk about potentially using |
||||||||||
// Turn __DEV__ and process.env checks into constants. | ||||||||||
replace({ | ||||||||||
__DEV__: isProduction ? 'false' : 'true', | ||||||||||
__PROFILE__: isProfiling || !isProduction ? 'true' : 'false', | ||||||||||
__UMD__: isUMDBundle ? 'true' : 'false', | ||||||||||
'process.env.NODE_ENV': isProduction ? "'production'" : "'development'", | ||||||||||
__EXPERIMENTAL__, | ||||||||||
// Enable forked reconciler. | ||||||||||
// NOTE: I did not put much thought into how to configure this. | ||||||||||
__VARIANT__: bundle.enableNewReconciler === true, | ||||||||||
}), | ||||||||||
Comment on lines
-402
to
-412
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||
// The CommonJS plugin *only* exists to pull "art" into "react-art". | ||||||||||
// I'm going to port "art" to ES modules to avoid this problem. | ||||||||||
// Please don't enable this for anything else! | ||||||||||
isUMDBundle && entry === 'react-art' && commonjs(), | ||||||||||
|
||||||||||
// Apply dead code elimination and/or minification. | ||||||||||
isProduction && | ||||||||||
closure( | ||||||||||
Object.assign({}, closureOptions, { | ||||||||||
// Don't let it create global variables in the browser. | ||||||||||
// https://github.com/facebook/react/issues/10909 | ||||||||||
assume_function_wrapper: !isUMDBundle, | ||||||||||
renaming: !shouldStayReadable, | ||||||||||
}) | ||||||||||
), | ||||||||||
// HACK to work around the fact that Rollup isn't removing unused, pure-module imports. | ||||||||||
// Note that this plugin must be called after closure applies DCE. | ||||||||||
isProduction && stripUnusedImports(pureExternalModules), | ||||||||||
// Add the whitespace back if necessary. | ||||||||||
terser({ | ||||||||||
// Don't let it create global variables in the browser. | ||||||||||
enclose: !isUMDBundle, | ||||||||||
mangle: !shouldStayReadable, | ||||||||||
}), | ||||||||||
Comment on lines
-419
to
+423
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This replaces
Since
I also see that the following appears to have been removed here: // HACK to work around the fact that Rollup isn't removing unused, pure-module imports.
// Note that this plugin must be called after closure applies DCE.
isProduction && stripUnusedImports(pureExternalModules), Is this no longer needed with the current version of Rollup/etc? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll want to keep GCC instead of Terser here. We found GCC to improve the code size significantly compared to Terser. |
||||||||||
shouldStayReadable && | ||||||||||
prettier({ | ||||||||||
parser: 'babel', | ||||||||||
singleQuote: false, | ||||||||||
trailingComma: 'none', | ||||||||||
bracketSpacing: true, | ||||||||||
sourceMap: false, | ||||||||||
}), | ||||||||||
Comment on lines
424
to
431
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tracing for the origins of
It seems like it is mostly used for FB internal builds, and RN (React Native?) builds. While I can't speak for FB internal usage at all, presumably there wouldn't be a huge benefit to having the sourcemap for the prettified file when it's already readable.
@jasonwilliams I'm curious, how much slower is it when generating the sourcemaps for |
||||||||||
// License and haste headers, top-level `if` blocks. | ||||||||||
{ | ||||||||||
renderChunk(source) { | ||||||||||
return Wrappers.wrapBundle( | ||||||||||
source, | ||||||||||
bundleType, | ||||||||||
globalName, | ||||||||||
filename, | ||||||||||
moduleType | ||||||||||
); | ||||||||||
}, | ||||||||||
}, | ||||||||||
// Record bundle size. | ||||||||||
// // License and haste headers, top-level `if` blocks. | ||||||||||
// { | ||||||||||
// renderChunk(source) { | ||||||||||
// return Wrappers.wrapBundle( | ||||||||||
// source, | ||||||||||
// bundleType, | ||||||||||
// globalName, | ||||||||||
// filename, | ||||||||||
// moduleType | ||||||||||
// ); | ||||||||||
// }, | ||||||||||
// }, | ||||||||||
Comment on lines
-438
to
+443
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@jasonwilliams What was the issue you ran into with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/facebook/react/blob/main/scripts/rollup/build.js const Wrappers = require('./wrappers'); https://github.com/facebook/react/blob/main/scripts/rollup/wrappers.js#L353-L385 function wrapBundle(
source,
bundleType,
globalName,
filename,
moduleType,
wrapWithModuleBoundaries
) {
if (wrapWithModuleBoundaries) {
switch (bundleType) {
case NODE_DEV:
case NODE_PROFILING:
case FB_WWW_DEV:
case FB_WWW_PROFILING:
case RN_OSS_DEV:
case RN_OSS_PROFILING:
case RN_FB_DEV:
case RN_FB_PROFILING:
// Remove the 'use strict' directive from source.
// The module start wrapper will add its own.
// This directive is only meaningful when it is the first statement in a file or function.
source = source.replace(USE_STRICT_HEADER_REGEX, '');
// Certain DEV and Profiling bundles should self-register their own module boundaries with DevTools.
// This allows the Timeline to de-emphasize (dim) internal stack frames.
source = `
${registerInternalModuleStart(globalName)}
${source}
${registerInternalModuleStop(globalName)}
`;
break;
}
}
// ..snip..
} The first part of Though looking at the current Which was added in:
This relies on Which is imported from: For each of the When meaningfully run,
It might be possibly to meaningfully generate the sourcemaps to handle this functionality, and/or rewrite it to use existing rollup plugins/features that already support sourcemaps. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my comments elsewhere in this review (ref) for how we could potentially use Also, looking at the dependencies of
While I haven't tried to use it yet, it would seem that this would be a perfect use case for fixing up the prepend/append (aka: 'wrapping with header/footer') of the output from
Therefore, using + const s = new MagicString(source);
// Remove the 'use strict' directive from source.
// The module start wrapper will add its own.
// This directive is only meaningful when it is the first statement in a file or function.
- source = source.replace(USE_STRICT_HEADER_REGEX, '');
+ s.replace(USE_STRICT_HEADER_REGEX, '');
// Certain DEV and Profiling bundles should self-register their own module boundaries with DevTools.
// This allows the Timeline to de-emphasize (dim) internal stack frames.
- source = `
- ${registerInternalModuleStart(globalName)}
- ${source}
- ${registerInternalModuleStop(globalName)}
- `;
+ // Note: If the newlines don't matter in the output then we can remove the \n's below
+ s.prepend(`${registerInternalModuleStart(globalName)}\n`)
+ s.append(`\n${registerInternalModuleStop(globalName)}\n`)
+
+ source = s.toString() There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like I missed the bit of code at the end of if (moduleType === RECONCILER) {
// Standalone reconciler is only used by third-party renderers.
// It is handled separately.
const wrapper = reconcilerWrappers[bundleType];
if (typeof wrapper !== 'function') {
throw new Error(
`Unsupported build type for the reconciler package: ${bundleType}.`
);
}
return wrapper(source, globalName, filename, moduleType);
}
// All the other packages.
const wrapper = wrappers[bundleType];
if (typeof wrapper !== 'function') {
throw new Error(`Unsupported build type: ${bundleType}.`);
}
return wrapper(source, globalName, filename, moduleType); Each of these functions (or the code that calls them) would need to similarly make use of
From a quick skim through:
While the original code just manipulates the Looking at Rollup's
It looks like to enable sourcemap support we would need to return an object We can use Which would end up looking something like: const s = new MagicString(source);
// do some manipulations with s.prepend, s.append, s.replace, etc
// TODO: maybe add some other options to s.generateMap as well?
return { code: s.toString(), map: s.generateMap({ source: filename }) }; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like The current
Looking at
But looking at This PR attempted to add testing support to AppVeyor for Node 11.x and 12.x, but never landed: Edit: I have opened an issue/PR to explore whether AppVeyor's node version can be bumped to a modern version, or other potential solutions: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like the potential concerns raised around
|
||||||||||
// // Record bundle size. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
sizes({ | ||||||||||
getSize: (size, gzip) => { | ||||||||||
const currentSizes = Stats.currentBuildResults.bundleSizes; | ||||||||||
|
@@ -576,7 +570,7 @@ async function createBundle(bundle, bundleType) { | |||||||||
const rollupConfig = { | ||||||||||
input: resolvedEntry, | ||||||||||
treeshake: { | ||||||||||
pureExternalModules, | ||||||||||
moduleSideEffects: pureExternalModules, | ||||||||||
Comment on lines
-579
to
+573
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
https://github.com/facebook/react/blob/main/scripts/rollup/build.js const Modules = require('./modules');
// ..snip..
const importSideEffects = Modules.getImportSideEffects();
const pureExternalModules = Object.keys(importSideEffects).filter(
module => !importSideEffects[module]
);
// ..snip..
// HACK to work around the fact that Rollup isn't removing unused, pure-module imports.
// Note that this plugin must be called after closure applies DCE.
isProduction && stripUnusedImports(pureExternalModules),
// ..snip.. https://github.com/facebook/react/blob/main/scripts/rollup/modules.js // For any external that is used in a DEV-only condition, explicitly
// specify whether it has side effects during import or not. This lets
// us know whether we can safely omit them when they are unused.
const HAS_NO_SIDE_EFFECTS_ON_IMPORT = false;
// const HAS_SIDE_EFFECTS_ON_IMPORT = true;
const importSideEffects = Object.freeze({
fs: HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'fs/promises': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
path: HAS_NO_SIDE_EFFECTS_ON_IMPORT,
stream: HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'prop-types/checkPropTypes': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
scheduler: HAS_NO_SIDE_EFFECTS_ON_IMPORT,
react: HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'react-dom/server': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'react/jsx-dev-runtime': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'react-fetch/node': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'react-dom': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
url: HAS_NO_SIDE_EFFECTS_ON_IMPORT,
ReactNativeInternalFeatureFlags: HAS_NO_SIDE_EFFECTS_ON_IMPORT,
});
// ..snip..
function getImportSideEffects() {
return importSideEffects;
} This code seems to be equivalent, just updated to no longer use the deprecated option. |
||||||||||
}, | ||||||||||
external(id) { | ||||||||||
const containsThisModule = pkg => id === pkg || id.startsWith(pkg + '/'); | ||||||||||
|
@@ -615,6 +609,8 @@ async function createBundle(bundle, bundleType) { | |||||||||
freeze: false, | ||||||||||
interop: false, | ||||||||||
esModule: false, | ||||||||||
// Remove 'use strict' from individual source files. | ||||||||||
strict: false, | ||||||||||
Comment on lines
+612
to
+613
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure that this is something we should be doing here. See my earlier comments in this review for more context.
Suggested change
|
||||||||||
}, | ||||||||||
}; | ||||||||||
const mainOutputPath = Packaging.getBundleOutputPath( | ||||||||||
|
@@ -627,7 +623,8 @@ async function createBundle(bundle, bundleType) { | |||||||||
format, | ||||||||||
peerGlobals, | ||||||||||
bundle.global, | ||||||||||
bundleType | ||||||||||
bundleType, | ||||||||||
isFBWWWBundle || forcePrettyOutput | ||||||||||
Comment on lines
+626
to
+627
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was const shouldStayReadable = isFBWWWBundle || isRNBundle || forcePrettyOutput; This ends up being passed to the Based on my skim of the changes in this PR, I believe the only case where we aren't going to want the sourcemaps is when I'd suggest reverting back to not passing this in as an arg at all, and just using the existing
Suggested change
|
||||||||||
); | ||||||||||
|
||||||||||
if (isWatchMode) { | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest versions: