Rollup freeze: false (#12879)

* Tell Rollup not to freeze bundles
* Only freeze bundles for DEV builds
This commit is contained in:
Brian Vaughn
2018-05-22 08:16:59 -07:00
committed by GitHub
parent 228183237e
commit abef60086e
+12 -2
View File
@@ -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,
@@ -401,7 +410,8 @@ async function createBundle(bundle, bundleType) {
mainOutputPath,
format,
peerGlobals,
bundle.global
bundle.global,
bundleType
);
console.log(`${chalk.bgYellow.black(' BUILDING ')} ${logKey}`);