jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.22k stars 507 forks source link

`npm run build` fails immediately if there is a `/src/macro.ts` file #1005

Open VicGUTT opened 3 years ago

VicGUTT commented 3 years ago

Current Behavior

Running npm run build fails immediately if there is a file named macro.ts (seem to work with .js) within the project. The issue seem to be coming from tsdx's babel-plugin-macros dependency. Using tsdx for the first time and learning about babel-plugin-macros for the first time, I'm not sure how to resolve this issue. Also not sure if I should be creating this issue here or on babel-plugin-macros's repo. Any guidance would be much appreciated.

Screenshot showcasing the problem after a fresh tsdx install

Expected behavior

npm run build should be smooth sailing on a fresh install.

Suggested solution(s)

Not sure how much tsdx relies on babel-plugin-macros, if it's a misconfiguration or if it's straight up a babel-plugin-macros bug. So hard to say.

Additional context

-

Your environment

  System:
    OS: Windows 10 10.0.19042
    CPU: (16) x64 Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
    Memory: 18.35 GB / 31.75 GB
  Binaries:
    Node: 14.15.3 - C:\code\bin\nodejs\node-v14\node.EXE
    npm: 6.14.9 - C:\code\bin\nodejs\node-v14\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.423.0), Chromium (89.0.774.68)
    Internet Explorer: 11.0.19041.1
  npmPackages:
    tsdx: ^0.14.1 => 0.14.1
    typescript: ^4.2.4 => 4.2.4