npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nwsee/core

v0.0.3

Published

vue项目插件,页面性能监控插件

Downloads

2

Readme

Intro

vue项目插件,页面性能监控插件

  • 支持监控页面性能指标数据,如FCP、LCP
  • 支持监控各个组件从创建到挂载完成的时长
  • 支持监控各个组件从创建到卸载的时长
  • 支持监控页面静态资源加载的时长
  • 支持监控JS错误,从打包文件映射到源码文件的错误位置

install

使用npm下载

npm install @nwsee/core

使用yarn下载

yarn add @nwsee/core

Usage

直接在main.js入口文件中导入,并且使用use()方法注册插件即可使用

import webmonitor from '@nwsee/core'

const app = createApp(App)
app
  .use(webmonitor)

Options

  • monitors :这个值是一个数组,并且数组内的项可以是 lcpfcpresourcecomponent
    • lcp:页面性能指标
    • fcp:页面性能指标,首次内容绘制
    • resource :开启监控静态资源加载时长
    • component:开启监控组件挂载和卸载的时长
  • isMap:这个值是一个布尔值,代表是否开启sourcemap 映射到源文件
  • baseUrl:监控服务器地址,所有的错误信息都可以上报到该服务器。sourcemap文件也要上传到监控服务器。(如果开启了isMap,那么这个baseUrl必填)

Demo

import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import monitor from '@nwsee/core'

const app = createApp(App)
app.use(monitor,{
  baseUrl:'http://192.168.1.9:3000',
  isMap:true
})
app.mount('#app')