mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
moved around plugin order to try and fix deadcode requires as per https://github.com/rollup/rollup/issues/855
This commit is contained in:
@@ -363,20 +363,23 @@ function getPlugins(entry, babelOpts, paths, filename, bundleType, isRenderer, m
|
||||
),
|
||||
babel(updateBabelConfig(babelOpts, bundleType)),
|
||||
alias(getAliases(paths, bundleType, isRenderer)),
|
||||
commonjs(getCommonJsConfig(bundleType)),
|
||||
];
|
||||
if (bundleType === UMD_PROD || bundleType === NODE_PROD || bundleType === FB_PROD) {
|
||||
plugins.push(
|
||||
uglify(uglifyConfig(bundleType !== FB_PROD, manglePropertiesOnProd)),
|
||||
replace(
|
||||
stripEnvVariables(true)
|
||||
)
|
||||
),
|
||||
// needs to happen after strip env
|
||||
commonjs(getCommonJsConfig(bundleType)),
|
||||
uglify(uglifyConfig(bundleType !== FB_PROD, manglePropertiesOnProd))
|
||||
);
|
||||
} else if (bundleType === UMD_DEV || bundleType === NODE_DEV || bundleType === FB_DEV) {
|
||||
plugins.push(
|
||||
replace(
|
||||
stripEnvVariables(false)
|
||||
)
|
||||
),
|
||||
// needs to happen after strip env
|
||||
commonjs(getCommonJsConfig(bundleType))
|
||||
);
|
||||
}
|
||||
// this needs to come last or it doesn't report sizes correctly
|
||||
|
||||
Reference in New Issue
Block a user