简体   繁体   English

在流星应用中调试本地npm链接包

[英]Debug local npm link package in meteor app

I am writing a javascript library that is npm linked to my meteor app. 我正在编写一个与我的流星应用程序链接的npm的JavaScript库。 I didn't yet publish the library to npm so it is only local. 我尚未将库发布到npm,因此它仅是本地的。 Now my problem is, that I want to debug inside the library while using it in my meteor app. 现在我的问题是,我想在流星应用程序中使用库时进行调试。

I can debug the meteor app components and using a sourcemap and a standalone html test page also the library itself. 我可以调试流星应用程序组件,并使用源映射和独立的html测试页以及库本身。 But as soon as I use import Library from 'library' in meteor it minifies, uglifies and mangles it. 但是,一旦我在流星中使用import Library from 'library'中的import Library from 'library'它就将其缩小,丑化并弄乱了。

Is there a way to tell either meteor's build system or my browser to use the library's source map? 有没有办法告诉流星的构建系统或我的浏览器使用图书馆的源地图?

Thanks in advance 提前致谢

您可以尝试删除Meteor压缩程序包,直到再次需要它:

meteor remove standard-minifier-js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM