weiran-zsd / dts-cli

Zero-config CLI for TypeScript package development
MIT License
442 stars 23 forks source link

dts watch doesn't work as expected #210

Open Jedliu opened 9 months ago

Jedliu commented 9 months ago

First of all, thank you for all your contributions to this library.

Current Behavior

  1. Create the lib npx dts-cli create mylib and choose basic template
  2. run npm run start
  3. update index.ts
iShot_2024-01-29_08 47 29

Expected behavior

dts-cli-lib.cjs.development.js and dts-cli-lib.esm.js should be updated in the dist folder. However, dts-cli-lib.esm.js is not updated. See the above image for your reference.

Suggested solution(s)

Additional context

Your environment

  System:
    OS: macOS 12.7.1
    CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
    Memory: 387.54 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
    pnpm: 8.6.3 - ~/Library/pnpm/pnpm
  Browsers:
    Brave Browser: 121.1.62.153
    Chrome: 121.0.6167.85
    Safari: 16.3
  npmPackages:
    dts-cli: ^2.0.4 => 2.0.4 
    typescript: ^5.3.3 => 5.3.3 
aladdin-add commented 9 months ago

thanks for the report, I was able to repro.

OlegWock commented 6 months ago

You can work around this by specifying format explicitly:

yarn start --format esm