最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Using Path Aliasing on NPM package - Stack Overflow

programmeradmin1浏览0评论

I am in the processes of developing an NPM package with many different directories. Internally, I manage this by using subpath imports in the package.json.

“imports” : { “#*”: “./src”, “#factories”: “./src/factories”…}

This works well when isolated to the package. However, when I install the package on a consuming application, the consuming application takes issue with the alaising when importing and using the package.

Is there a way to keep the path alaising isolated to the package and not have to transfer additional configuration to the consuming application, or do I need to just return to the uglier but functional unaliased relative paths?

发布评论

评论列表(0)

  1. 暂无评论