gpt4 book ai didi

angular - 我如何让源映射为 npm 链接的 Angular 库工作

转载 作者:行者123 更新时间:2023-12-04 14:21:04 25 4
gpt4 key购买 nike

我用 ng g library @my-org/some-lib 创建了 angular 7 库并通过 npm link 在单独的 Angular 应用程序中使用它能够开发应用程序和库。

现在我发现在开发工具中,我将库视为单独的 my-org-some-libvendor.js.map 解析的捆绑 js 文件但它没有进一步解析 sourceMappingURL=my-org-some-lib.js.map存在于 my-org-some-lib.js 中并且 map 文件实际上是在构建的库中生成的。

最佳答案

对我有用的是来自这里 https://angular.io/guide/workspace-config#source-map-configuration

"sourceMap": {
"scripts": true,
"styles": true,
"hidden": false,
"vendor": true
}

关于angular - 我如何让源映射为 npm 链接的 Angular 库工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54891679/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com