How to Not Minify Source with webpack

C

codeguru

Member
Freecoin
282
The webpack JavaScript utility has taken over the modern JavaScript landscape, so much so that it’s hard to be a JavaScript developer and not use it. JavaScript build utilities are the point where they do best practices implicitly, like minify code, caching, and more.

I was recently debugging a bundled webpack app and it quickly became clear that the only way forward was debugging the actual source, not the minified code. Duh.y

To prevent webpack from minifying the source, add the following to your webpack config:

{
// .... other webpack, like output, etc.
optimization: {
minimize: false
},
}


This simple flag makes debugging easier, if only enabled for a moment. I love how webpack allows you to take advantage of its feature set while being able to disable really quickly!

The post How to Not Minify Source with webpack appeared first on David Walsh Blog.



Continue reading...
 

Richest Freecoded User

Most Freecoin

freecoded
freecoded
5,282 Freecoin
P
Peterparker87
1,755 Freecoin
J
Johnhendrick
1,551 Freecoin
S
Smith16
738 Freecoin
M
mahlibeardman
674 Freecoin
Davy200
Davy200
590 Freecoin
A
Alfrenoe87
582 Freecoin
D
domnickfury
505 Freecoin
R
riyageorge0895
496 Freecoin
peterkester96
peterkester96
450 Freecoin
Top