@hawk.so/nuxt
v1.0.0
Published
Hawk error tracker integration to Nuxt app
Downloads
24
Readme
@hawk.so/nuxt
Hawk error tracker integration for Nuxt app
Features
- 😋 Effortless installation
- 🦅 Track errors seamlessly across your Nuxt app
- 💼 Composable for manually sending errors and logs
- 💌 Sends release info with source maps
Quick Setup
Install the module with one command:
npx nuxi module add @hawk.so/nuxt
Then connect and configure to your nuxt.config.ts
. Pass there an Integration Token you got from Hawk project.
You can pass it directly or use .env file wich is supported by Nuxt out of the box.
export default defineNuxtConfig({
modules: [
'@hawk.so/nuxt'
],
hawk: {
token: process.env.HAWK_TOKEN,
},
})
Passing additional options
You can pass user
, context
, beforeSend
and other JS Catcher options via catcherOptions
config property.
export default defineNuxtConfig({
modules: [
'@hawk.so/nuxt'
],
hawk: {
token: process.env.HAWK_TOKEN,
catcherOptions: {
context: {
// any data you want to send with all events
appName: 'Hawk Nuxt Playground',
},
// method for filtering/modifying an event to be sent
beforeSend: (event) => {
event.context.appVersion = '1.0.0'
return event
},
},
},
})
Contribution
# Install dependencies
yarn
# Generate type stubs
yarn run dev:prepare
# Develop with the playground
yarn run dev
# Build the playground
yarn run dev:build
# Run ESLint
yarn run lint
# Run Vitest
yarn run test
yarn run test:watch
# Release new version
yarn run release