About this tool
Compare webpack devtool source map types on build speed, rebuild speed, debug accuracy and production safety.
A source map strategy is the choice of how much of your original code a bundler records alongside the built output, and every level of fidelity costs build time. This chooser ranks all thirteen webpack devtool values using webpack's own documented matrix of build speed, rebuild speed, production safety and mapping quality, filtered by whether your source may be public and whether you upload maps to an error tracker. It returns one devtool value plus the nearest equivalent setting for Vite, esbuild and Next.js.
Open Source Map Strategy Chooser on AltFTool — it loads instantly in your browser.
Set Which build is this? to Development / local dev server or Production build, then set What matters most? to Fast feedback loop, Balanced or Most accurate stack traces.
Tick I upload maps to an error tracker, and on a production build also My source can be public and Shipped bundle size matters.
Read the Recommended devtool with its fit score out of 100, copy the webpack.config.js, vite.config.js, esbuild and next.config.js snippets, and scan Every candidate, ranked.
Ratings are transcribed from webpack's devtool reference, not guessed.
eval and inline maps are removed from production builds automatically, with the reason shown.
Every recommendation ships with the equivalent Vite, esbuild and Next.js config.
eval-cheap-module-source-map is the classic manual pick for webpack dev builds: rebuilds stay fast, and stack traces point at your original files with correct line numbers, without eval-source-map's slower first build. This tool weighs build speed, rebuild speed and mapping quality together, so its automatic top pick tends toward whichever extreme your chosen priority favours — for example the default Balanced priority favours eval-source-map, for the column-accurate positions useful when debugging minified vendor code or async stack traces. Pick eval-cheap-module-source-map directly from the ranked list whenever fast rebuilds and line-accurate original files matter more to you than the automatic score.
Shipping a normal source-map is safe for your servers but not for your source: the bundle carries a sourceMappingURL comment, so anyone can fetch the .map and read your original files. Use hidden-source-map to generate the map without the comment and upload it only to your error tracker, or nosources-source-map if you want positions mapped with no source text at all.
It drops column numbers, so a mapped position resolves to a line but not to a character offset within it. The module variants such as cheap-module-source-map additionally map back through your loaders to the pre-transform file, while the plain cheap variants stop at the loader output.
Full source-map generation is the slowest build option webpack lists, because a complete mapping has to be computed and serialised for every module rather than reused from the eval wrapper. If build minutes matter more than symbolication, hidden-nosources-source-map keeps position mapping while emitting a much smaller map, and turning devtool off entirely is the fastest build available.