1.0.6 • Published 11 months ago

@hawk.so/vite-plugin v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Hawk Vite Plugin

Vite plugin for sending releases with sourcemaps to Hawk.

Install

yarn add @hawk.so/vite-plugin -D

Connect

Include the plugin to the plugins list of vite.config file

import hawkVitePlugin from '@hawk.so/vite-plugin';

export default defineConfig({
  plugins: [
    ...,
    hawkVitePlugin({
      token: '' // Your project's Integration Token
    })
  ]
})

Plugin options

nametyperequireddescription
tokenstringrequiredYour project's Integration Token
releasestring/numberoptionalUnique identifier of the release. Used for source map consuming (see below)
removeSourceMapsbooleanoptionalShows if the plugin should remove emitted source map files. Default is true
collectorEndpointstringoptionalSourcemaps collector endpoint overwrite

Connect Release to JavaScript catcher

After plugin finish its work, it will export release information to the global scope. You can access release identifier via window.HAWK_RELEASE in browser and global.HAWK_RELEASE in NodeJS and pass this data to the JavaScript Catcher on initialization.

TypeScript

To make TypeScript see typings for window.HAWK_RELEASE and global.HAWK_RELEASE add their declaration in your "tsconfig.json"

{
  "compilerOptions" : {
    "types": {
      "@hawk.so/vite-plugin/global"
    }
  }
}
1.0.5-rc.1

12 months ago

1.0.6

11 months ago

1.0.5

12 months ago

2.0.1-rc.1

12 months ago

2.0.1-rc.2

12 months ago

1.0.6-rc.1

11 months ago

1.0.4-rc.1

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago