Cl
SIASapphire - Imagine a framework
•Created by Cl on 6/10/2024 in #sapphire-support
Folders not initialized when building with Typescript
Thanks for your help @Boomeravna
14 replies
SIASapphire - Imagine a framework
•Created by Cl on 6/10/2024 in #sapphire-support
Folders not initialized when building with Typescript
So, I tried and I can say that for now the bun builder (that is in beta) cannot recreate the correct structure of the project because it doesn't see the relationship between the two files (index.ts ready.ts) from its entrypoint (index.ts) as stated in the documentation and thats why I can't see my listeners or commands being initialized.
Three options:
- the first one is to use tsc to build the structure
- and the second one is to not transpile my code and run the ts files directly.
- the last one is to build each files separately using the --splitting option.
(or maybe I can try to import the listeners into the index but that shouldn't be done if it is not used directly)
I will go for the second or third one.
14 replies
SIASapphire - Imagine a framework
•Created by Cl on 6/10/2024 in #sapphire-support
Folders not initialized when building with Typescript
I will try it later
14 replies
SIASapphire - Imagine a framework
•Created by Cl on 6/10/2024 in #sapphire-support
Folders not initialized when building with Typescript
Yes that’s what I mean. Okay so my build phase is incorrect maybe thats why it doesn’t work. I thought bun transpiled the entrypoint and its structure into a single js file
14 replies
SIASapphire - Imagine a framework
•Created by Cl on 6/10/2024 in #sapphire-support
Folders not initialized when building with Typescript
I get this at the end:
/ dist / index.js
/ src / index.ts
/ src / listeners / ready.ts
14 replies
SIASapphire - Imagine a framework
•Created by Cl on 6/10/2024 in #sapphire-support
Folders not initialized when building with Typescript
But I didn’t verify if my build integrate the other files. Maybe my command is only transpiling the index and not everything into a single file
14 replies
SIASapphire - Imagine a framework
•Created by Cl on 6/10/2024 in #sapphire-support
Folders not initialized when building with Typescript
I set the main to dist/index.js if I remember because I’m building with bun build src/index.js —target bun —outdir ./dist
14 replies
SIASapphire - Imagine a framework
•Created by Cl on 6/10/2024 in #sapphire-support
Folders not initialized when building with Typescript
Thanks. I will check later but I’m sure I set it for the bun version. I will keep you in touch.
14 replies