Skip to main content

Coralogix Esbuild Plugin

npm version npm dm npm dt

An Esbuild plugin that creates metadata asset for support micro frontend in Coralogix.

Installation

npm i -D @coralogix/esbuild-plugin

Example

// esbuild.config.js
const esbuild = require('esbuild');
const { coralogixEsbuildPlugin } = require("@coralogix/esbuild-plugin");

await esbuild.build({
entryPoints: ['app.js'],
bundle: true,
outfile: 'out.js',
plugins: [
coralogixEsbuildPlugin({
app:'test-app',
version:'1.0.0'
})
],
})

Options

OptionTypeDescription
appstringName of the micro frontend. Coralogix labels errors from this bundle with it.
versionstringVersion of the micro frontend, labelled alongside app.
outputDirstringOptional. Directory to write cx-metadata.json into, relative to the build output directory. Defaults to the root of the build output.

Set outputDir when the bundle is served from somewhere other than the root of the output directory, so the RUM SDK finds the metadata next to the assets it describes.

Last updated on
Was this page helpful?