Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

@flareapp/vite-plugin-sourcemap-uploader

Package Overview
Dependencies
2
Maintainers
1
Versions
7
Issues
File Explorer

Advanced tools

@flareapp/vite-plugin-sourcemap-uploader

The Flare Vite plugin helps you send sourcemaps of your compiled JavaScript code to Flare. This way, reports sent using the `@flareapp/flare-client` will be formatted correctly.

    1.0.2latest
    GitHub

Version published
Maintainers
1
Weekly downloads
958
increased by37.64%

Weekly downloads

Changelog

Source

1.0.2 - 2022-12-19

  • added support for vite 4

Readme

Source

Vite plugin for sending sourcemaps to Flare

The Flare Vite plugin helps you send sourcemaps of your compiled JavaScript code to Flare. This way, reports sent using the @flareapp/flare-client will be formatted correctly.

Additionally, it automatically passes the Flare API key to @flareapp/flare-client. This way, flare.light() works without any additional configuration.

Check the JavaScript error tracking section in the Flare documentation for more information.

Looking for the Flare client? Go to the @flareapp/flare-client repo.

Installation

Install the plugin using NPM or Yarn:

yarn add --dev @flareapp/vite-plugin-sourcemap-uploader # or npm install --save-dev @flareapp/vite-plugin-sourcemap-uploader

Next, add the plugin to your vite.config.js file:

import { defineConfig } from 'vite'; import flareSourcemapUploader from '@flareapp/vite-plugin-sourcemap-uploader'; export default defineConfig({ plugins: [ flareSourcemapUploader({ key: 'YOUR API KEY HERE' }), ], });

Run the vite build command to make sure the sourcemaps are generated. You should see the following lines in the output:

@flareapp/flare-vite-plugin-sourcemaps: Uploading 12 sourcemap files to Flare. @flareapp/flare-vite-plugin-sourcemaps: Successfully uploaded sourcemaps to Flare.

Configuration

  • key: string (required): the Flare API key
  • base: string: the base path of built output (defaults to Vite's base path)
  • runInDevelopment: boolean: whether to upload sourcemaps when NODE_ENV=development or when running the dev server (defaults to false)
  • version: string: the sourcemap version (defaults to a fresh uuid per build)
  • removeSourcemaps: boolean: whether to remove the sourcemaps after uploading them (defaults to false). Comes in handy when you want to upload sourcemaps to Flare but don't want them published in your build.

development

Publish a new release:

npm version patch npm publish

Tag the release:

git tag VERSION git push origin VERSION

Replace VERSION with v + the version from package.json — for example, v1.0.2

Keywords

FAQs

Last updated on 19 Dec 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc