Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for (let asset of bundle.largestAssets) {
// Add a row for the asset.
rows.push(
{asset == bundle.largestAssets[bundle.largestAssets.length - 1]
? '└── '
: '├── '}
{formatFilename(asset.filePath, {})}
{prettifySize(asset.size)}
{prettifyTime(asset.time)}
);
}
// Show how many more assets there are
if (bundle.totalAssets > bundle.largestAssets.length) {
rows.push(
└──{' '}
+ {bundle.totalAssets - bundle.largestAssets.length} more assets
if (logLevelFilter < logLevels.info) {
break;
}
let message = getProgressMessage(event);
if (message != null) {
writeOut(message);
}
break;
}
case 'buildSuccess':
if (logLevelFilter < logLevels.info) {
break;
}
writeOut(`Built in ${prettifyTime(event.buildTime)}`);
if (options.mode === 'production') {
render();
}
break;
case 'buildFailure':
if (logLevelFilter < logLevels.error) {
break;
}
writeErr(event.error, options.logLevel);
break;
case 'log': {
switch (event.level) {
case 'warn':
case 'error':
if (logLevelFilter >= logLevels[event.level]) {
case 'buildSuccess':
if (logLevel < logLevels.info) {
break;
}
return {
...state,
progress: null,
bundleGraph: event.bundleGraph,
logs: [
...state.logs,
{
type: 'log',
level: 'success',
message: `Built in ${prettifyTime(event.buildTime)}.`
}
]
};
case 'buildFailure':
if (logLevel < logLevels.error) {
break;
}
return {
...state,
progress: null,
logs: [
...state.logs,
{
type: 'log',