---
title: Webpack plugin
description: Install and configure the Coralogix Webpack plugin, which emits the metadata asset the RUM SDK uses to attribute errors to a micro frontend.
url: https://coralogix.com/docs/user-guides/rum/sdk-installation/javascript/bundler-plugins/webpack/
product: rum
feature: Source Mapping
feature_id: source-mapping
feature_identifier: rum/source-mapping
last_updated: '2026-08-21'
---

# Coralogix Webpack plugin

[![npm version](https://img.shields.io/npm/v/@coralogix/webpack-plugin)](https://www.npmjs.com/package/@coralogix/webpack-plugin) [![npm dm](https://img.shields.io/npm/dm/@coralogix/webpack-plugin)](https://www.npmjs.com/package/@coralogix/webpack-plugin) [![npm dt](https://img.shields.io/npm/dt/@coralogix/webpack-plugin)](https://www.npmjs.com/package/@coralogix/webpack-plugin)

> A Webpack plugin that creates metadata asset for support micro frontend in Coralogix.

## Installation

```
npm i -D @coralogix/webpack-plugin
```

## Example

```
// webpack.config.js

const { CoralogixWebpackPlugin } = require("@coralogix/webpack-plugin");



module.exports = {

  // ... other config above ...



  plugins: [

    new CoralogixWebpackPlugin({

      app:'test-app',

      version:'1.0.0'

    }),

  ],

};
```

## Options

| Option      | Type   | Description                                                                                                                             |
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `app`       | string | Name of the micro frontend. Coralogix labels errors from this bundle with it.                                                           |
| `version`   | string | Version of the micro frontend, labelled alongside `app`.                                                                                |
| `outputDir` | string | Optional. 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.
