next-bundle-analyzer
Version:
NextJS version of Webpack Bundle Analyzer.
21 lines (18 loc) • 535 B
JavaScript
;
function getInternalOptions({ clientOnly = true, enabled = true, format = 'html', html = {}, json = {}, reportDir = 'analyze', reportFilename = 'bundles', } = {}) {
const { open = true } = html;
const { filter = null } = json;
if (!Array.isArray(format)) {
format = [format];
}
return {
clientOnly,
enabled,
format,
html: { open },
json: { filter },
reportDir,
reportFilename,
};
}
exports.getInternalOptions = getInternalOptions;