webpack 不压缩代码_如何不使用webpack缩小源代码

在现代JavaScript开发中,webpack 已成为不可或缺的工具,通常会自动进行代码压缩。然而,在调试过程中,直接查看未压缩的源代码更为方便。要阻止webpack压缩代码,只需在webpack配置文件中添加一个简单的标志即可,这使得调试过程更加便捷。通过这种临时开启的设置,开发者可以灵活地利用webpack的功能,同时在需要时快速切换回未压缩模式。
摘要由CSDN通过智能技术生成

webpack 不压缩代码

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.

webpack JavaScript实用程序已经占领了现代JavaScript领域,以至于很难成为一个JavaScript开发人员并且不使用它。 JavaScript构建实用程序是它们隐式地执行最佳实践的地方,例如最小化代码,缓存等。

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

我最近正在调试捆绑的webpack应用程序,很快就知道前进的唯一方法是调试实际源代码,而不是最小化的代码。 杜伊

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

为了防止webpack缩小源代码,请将以下内容添加到webpack配置中&#x

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值