Closed nemanjastanic closed 6 months ago
@carlocorradini Might this be related to ESM support?
ESM code is using require
instead of import
:
@MichalLytek How did you build the package? I'll try locally to check if this is due to an upgrade of a dependency
@MichalLytek I confirm is the build process
@carlocorradini
@MichalLytek I've tried downgrading to typescript v5.1.6
(same as alpha) and manually:
npx tsc --build ./tsconfig.esm.json
And it does not works.
It looks like typescript
is ignoring esm
... WTF 😅
Any thoughts?
It was working as we've published beta 3 via gh actions 😄
I guess this was me doing deps upgrade without checking build results:
We now can't trick typescript to emit ESM for commonjs project, we need a real ESM project to emit ESM code.
@MichalLytek Yup, I've tried and we can't trick TypeScript anymore
Should be fixed by 51ff280, will see in beta.5
if that works 😉
Thanks!
@nemanjastanic Published v5, please check now if it works 😉
Published v5, please check now if it works 😉
@MichalLytek the v5-package is nearly empty; the build
directory is missing.
@MichalLytek I can confirm that the build
directory is missing in 2.0.0-beta.5
.
Thanks for the report. Our publish workflow is not working so I do publish by myself and something went wrong.
Should be ok now with 2.0.0-beta.6
.
Apologize if the CI/CD is currently broken 😔 It's my fault I'll fix it ASAP
Describe the Bug I started having this issue after upgrading from
2.0.0-beta.2
to2.0.0-beta.4
. I can confirm this because it was fixed after downgrading to2.0.0-beta.3
.I am using SWC to compile my project.
To Reproduce
The following snippet will fail with these configurations.
.swcrc
tsconfig.json
Expected Behavior The function is imported without any issues.
Logs![Screenshot 2024-01-04 at 5 45 09 PM](https://github.com/MichalLytek/type-graphql/assets/105949556/781876a8-c247-4d35-b537-7d736004e052)
Environment (please complete the following information):