mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
This package is required to be ran with `--production` in order to for it to accurately use data from the minifier which is only provided when emulating or actually in production. The additional work required in this mode is too costly to run during normal development as the minification process (provided by UglifyJS, one of the fastest minifiers) is still quite slow. Once added, this package will display a sundial chart showing the weight of the modules included in the application, in the web-browser, on top of your existing application. While maybe not the best final product, it's certainly something we can iterate on and improve. This package should be removed before bundling/deploying for production.
15 lines
487 B
JavaScript
15 lines
487 B
JavaScript
export const packageName = "bundle-visualizer";
|
|
export const classPrefix = "meteorBundleVisualizer";
|
|
export const methodNameStats = `_meteor/${packageName}/stats`;
|
|
export const typeBundle = "bundle";
|
|
export const typePackage = "package";
|
|
export const typeNodeModules = "node_modules";
|
|
|
|
function capitalizeFirstLetter(str) {
|
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
}
|
|
|
|
export function prefixedClass(className) {
|
|
return `${classPrefix}${capitalizeFirstLetter(className)}`;
|
|
}
|