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. 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