The Debugmate Webpack Plugin is a tool designed to help identify and report errors during the Webpack build process. It also sends source maps to show exactly where the error occurred in your application. During the build, the plugin captures errors and sends detailed reports to Debugmate.
Add the plugin to your project:
npm install @debugmate/webpack-plugin
To use the Debugmate Webpack Plugin, add it to your Webpack configuration:
const { DebugmateWebpackPlugin } = require('@debugmate/webpack-plugin');
module.exports = {
// ... other Webpack configurations ...
devtool: "source-map",
plugins: [
new DebugmateWebpackPlugin({
domain: "https://your-new-domain.com",
token: "new-api-token",
user: {
id: 123,
name: "Jane Doe",
email: "jane.doe@example.com",
},
environment: {
environment: "staging",
debug: true,
timezone: "PST",
server: "apache",
},
request: {
url: "https://api.example.com/resource",
method: "POST",
params: { key: "value" },
},
}),
],
};
- domain: URL of the server where error reports will be sent.
- token: Authentication token for the server.
- user: User information (id, name, email).
- environment: Environment information (environment, debug, timezone, server).
- request: Request information (url, method, params).