esbuild-loader
Webpack - Preserve Class Names During Minification
· ☕ 3 min read
Suppose you have the following ES6 code and you want to have a refactor safe way to output the service name without instantiating an object. MyFancyService.name will work fine in dev, until you decide to minify it with webpack. You see, by default, class names will be minified, and at runtime the above code line will become something like Ab.name.