@empathyco/x-components
Version:
Empathy X Components
33 lines (30 loc) • 1.03 kB
JavaScript
import { setupDevtoolsPlugin } from '@vue/devtools-api';
import { setupTimelinePlugin } from './timeline.devtools.js';
import { setupWiringDevtools } from './wiring.devtools.js';
/**
* Setups a plugin for the Vue's devtools adding:
* - {@link XEvent}s timeline. Every event is recorded in time, and its payload and metadata can be
* inspected.
* - Wiring inspector. Events and its wires can be viewed and disabled.
*
* @param app - The Vue application instance the devtools should track.
* @beta
*/
function setupDevtools(app) {
setupDevtoolsPlugin({
id: 'x-components-devtools-plugin',
label: 'X Components',
packageName: '@empathyco/x-components',
homepage: 'https://empathy.co',
enableEarlyProxy: true,
// eslint-disable-next-line ts/no-unsafe-assignment
app,
}, api => {
if (api) {
setupTimelinePlugin(api);
setupWiringDevtools(api);
}
});
}
export { setupDevtools };
//# sourceMappingURL=devtools.plugin.js.map