From 8ccc880917790a01d319c95d3386e1d0cbee0aaf Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Tue, 17 Dec 2024 12:47:18 +0100 Subject: [PATCH] feat: Document native webpack support --- packages/webpack/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/webpack/README.md b/packages/webpack/README.md index 6bc050f..2dcc3cd 100644 --- a/packages/webpack/README.md +++ b/packages/webpack/README.md @@ -4,6 +4,25 @@ Injects Debug IDs into source and sourcemaps when using webpack. +Webpack v5.97.0 and later support debug IDs natively without any plugins. Just +add `-debugids` to the end of any devtool option: + +`webpack.config.mjs` + +```ts +export default { + entry: "./src/main.js", + mode: "production", + devtool: "source-map-debugids", + output: { + filename: "main.js", + path: "./dist", + }, +}; +``` + +For older versions of webpack, you can use this plugin to inject debug IDs: + `webpack.config.mjs` ```ts