Skip to content

Commit

Permalink
Rollup freeze: false (facebook#12879)
Browse files Browse the repository at this point in the history
* Tell Rollup not to freeze bundles
* Only freeze bundles for DEV builds
  • Loading branch information
bvaughn authored May 22, 2018
1 parent 33289b5 commit 7c0aca2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,22 @@ function getBabelConfig(updateBabelOptions, bundleType, filename) {
}
}

function getRollupOutputOptions(outputPath, format, globals, globalName) {
function getRollupOutputOptions(
outputPath,
format,
globals,
globalName,
bundleType
) {
const isProduction = isProductionBundleType(bundleType);

return Object.assign(
{},
{
file: outputPath,
format,
globals,
freeze: !isProduction,
interop: false,
name: globalName,
sourcemap: false,
Expand Down Expand Up @@ -401,7 +410,8 @@ async function createBundle(bundle, bundleType) {
mainOutputPath,
format,
peerGlobals,
bundle.global
bundle.global,
bundleType
);

console.log(`${chalk.bgYellow.black(' BUILDING ')} ${logKey}`);
Expand Down

0 comments on commit 7c0aca2

Please sign in to comment.