MCPcopy Index your code
hub / github.com/developit/optimize-plugin / getCorejsVersion

Function getCorejsVersion

src/lib/util.js:54–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 * @returns {number}
53 */
54export function getCorejsVersion () {
55 if (!corejsVersion) {
56 try {
57 // @ts-ignore
58 corejsVersion = parseInt(require('core-js/package.json').version, 10);
59 console.log(`[OptimizePlugin] Detected core-js version ${corejsVersion}`);
60 } catch (e) {
61 console.warn(
62 `[OptimizePlugin] Unable to detect installed version of core-js. Assuming core-js@${DEFAULT_COREJS_VERSION}.`
63 );
64 corejsVersion = DEFAULT_COREJS_VERSION;
65 }
66 }
67 return corejsVersion;
68}
69
70export function createPerformanceTimings () {
71 const timings = [];

Callers 1

optimizeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected