BioforestChain / pkgm

4 stars 0 forks source link

如何避免profiles继承式污染? #29

Open Gaubee opened 2 years ago

Gaubee commented 2 years ago
const exports = {
  "./web/A": "./lib/A#web.ts",
   "./node/A": "./lib/CryptoHelper#A.ts"
}
import "xx/web/A"

改进成

const exports = {
  "#/A": "#lib/A"
}
import "xx/#/A"
ryanroe commented 2 years ago

针对web/node,当前折中解决方案是使用nodejs的条件导出。 使用对应 exports里的browser/node字段