1.0.0 • Published 3 years ago
vite-plugin-flare-sourcemap v1.0.0
vite-plugin-flare-sourcemap
Vite plugin to send source maps to Flare.
Automatically adds a FLARE_SOURCEMAP_VERSION
global to vite (the flare-client-js should automatically use this).
Usage
// vite.config.ts
import { defineConfig, loadEnv } from "vite";
import flareJs from "vite-plugin-flare-sourcemap";
export default defineConfig(({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
const { FLARE_KEY } = process.env;
return {
plugins: [mode === "production" && flareJs({ key: FLARE_KEY })],
build: {
sourcemap: mode === "production",
},
};
});
Source maps will not upload without a key.
License
Licenced with GPLv3
1.0.0
3 years ago