作者:手机用户2502941301 | 来源:互联网 | 2023-05-19 09:20
IamnewtowebpackandIamconvertinganexistingwebapplicationtouseit.我是webpack的新手,我正在转换现有的
I am new to webpack and I am converting an existing web application to use it.
我是webpack的新手,我正在转换现有的Web应用程序来使用它。
I am using webpack to bundle and minify my JS which is great when deployed, however this makes it very challenging to debug while in developement.
我正在使用webpack捆绑和缩小我的JS,这在部署时非常好,但这使得在开发过程中进行调试非常具有挑战性。
Typically I use chrome's built in debugger to debug JS issues. (Or Firebug on firefox). However with webpack everything is stuffed in one file and it becomes challenging to debug using that mechanism.
通常我使用chrome的内置调试器来调试JS问题。 (或firefox上的Firebug)。然而,对于webpack,所有内容都填充在一个文件中,使用该机制进行调试变得具有挑战性。
Is there a way to quickly turn on and off bundeling? or turn on and off minifying?
有没有办法快速打开和关闭bundeling?或者打开和关闭缩小?
I have looked to see if there is some script loader configuration or other setting but it does not appear ovious.
我已经查看是否有一些脚本加载程序配置或其他设置,但它看起来不是很明显。
I have not yet had the time to convert everything to act like a module and use requires. So I simply use require("script!./file.js") pattern for my loading.
我还没有时间将所有内容转换为模块和使用要求。所以我只需要使用require(“script!。/ file.js”)模式进行加载。
5 个解决方案