1

I'm trying to compile my project to a single js file and definition, however the compiler doesn't seem to do it correctly.

example: node /home/ian/.m2/repository/com/williamsinteractive/oxygen/gdk-build/0.3.0-dirty/compile/tsc/1.3.0/tsc.js --out test.js -m amd -t ES5 -d Command.ts

A blank test.js and test.d.ts gets created with no code in them.

Also a Command.js and a Command.d.ts get created with the code in them.

I want to be able to compile all my classes into a single .js file and ideally a single .d.ts file as it is a library to be imported by other projects.

ian.c
  • 288
  • 1
  • 2
  • 10
  • Maybe this answer clarifies something ? [35963346 / only-amd-and-system-modules-are-supported-alongside-out](https://stackoverflow.com/a/76813267/7556457) – kca Aug 01 '23 at 15:46

1 Answers1

1

TypeScript doesn't support --out with external modules. Luckily there are external tools that do a great job for this e.g. for amd recommend you look at r.js

basarat
  • 261,912
  • 58
  • 460
  • 511