Skip to content

laioutr/app-vercel-speed-insights

Repository files navigation

Vercel Speed Insights (Laioutr App)

npm version npm downloads License Nuxt

Integrate Vercel's Speed Insights into Laioutr.

See laioutr.com for more information about Laioutr.

Features

  • Native Laioutr App: Seamlessly adds Vercel Speed Insights to your Laioutr Frontend.
  • Nuxt integration: Ships as a Nuxt module used by Laioutr Frontend.
  • Zero-config: No need to configure anything. Install the app and see the insights in your dashboard.

Configuration

You can configure the module by adding the following to your nuxt.config.ts file:

export default defineNuxtConfig({
  modules: ["@laioutr/app-vercel-speed-insights"],
  "@laioutr/app-vercel-speed-insights": {
    sampleRate: 0.5, // 50%
  },
});
  • sampleRate: The sample rate for the Speed Insights. Defaults to 1 (100%).

Quick Setup

Before installing dependencies, you need to create a copy of the .npmrc.config file called .npmrc and fill in the NPM_LAIOUTR_TOKEN with your npm token. You can find this token in your project settings.

  • pnpm i
  • npx @laioutr/cli project fetch-rc -p <organization slug>/<project slug> -s <project secret key> - This will load the laioutrrc.json file with the current remote project configuration.
  • pnpm dev

That's it! You can now use the Vercel Speed Insights app in your Laioutr Frontend

You can find a thorough guide on getting started with Laioutr development in our developer guide.

Publishing

To publish a new version, run pnpm release. This will:

  • Run the tests
  • Update the changelog
  • Publish the package to npmjs.org
  • Push the changes to the repository

Private publishing

If you want to publish a private package to npm.laioutr.cloud, you need to:

  1. Make sure you have a .npmrc with your private npm registry token.
  2. Add this line to the package.json file: "publishConfig": { "registry": "https://npm.laioutr.cloud/" }
  3. Make sure your package-name follows the @laioutr-org/<organization-slug>_<package-name> format.

Contribution

Follow the setup guide to get started.

About

Integrate Vercel Speed Insights into Laioutr

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published