Installation and usage

Profiler can be used directly through CDN or installed using CLI like NPM or YARN.



yarn add -D @stylify/profiler
npm i -D @stylify/profiler


<script src=""></script>


Profiler can be used only in the browser. Primarily it takes data from Runtime. When Runtime is not detected, it searches for data in script tags with a class stylify-profiler-data. These script tags must provide a valid json that is then parsed and used inside the profiler.

import { Runtime } from '@stylify/runtime';
import { Profiler } from '@stylify/profiler';

// Profiler should be loaded before Runtime is initialized (if Runtime is present)
new Profiler();
new Runtime();