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 33289b530c
commit 7c0aca289d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 2 deletions

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}`);