Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#1397·tsup

Insonsistent handling of the "browser" field

Author: singpolymaCreated May 6, 2026Updated May 6, 2026

I have this in my package.json:

  "browser": {
    "./persistence.js": "./persistence-browser.js"
  },

when I use tsup --platform browser it uses the browser version of the js, as it should. but with --dts it gets the types for the non-browser version.

Source: egoist/tsup

View original on GitHubView discussion on GitHub