Beginner Typescript coder: Need help compiling a Typescript file for web use
Budget: £10 – £20 GBP
This should be very easy for someone familiar with typescript. I am very new to typescript and need someone to show me how to compile typescript code over multiple files into a single javascript file. Which can then be used in the browser inside a script tag like this <script src="example.js"></script>
I have attached zip of the files here. I am trying to compile the home.ts file into javascript it is very simple dummy project to make things easier. There is also a file called "homeShouldLookLikeThis.js" which is what i expect the compiled javascript file (home.js) to look like.
## Things I have tried
"tsc public/home.ts" - this did not work because the output javascript file contained require statements which won't work inside a browser
webpack - I tried this but all the code came out wrapped in an annonymous function which I do not want.
Good luck! I imagine it is a very simple fix - probably something todo with the tsconfig.json
I have attached zip of the files here. I am trying to compile the home.ts file into javascript it is very simple dummy project to make things easier. There is also a file called "homeShouldLookLikeThis.js" which is what i expect the compiled javascript file (home.js) to look like.
## Things I have tried
"tsc public/home.ts" - this did not work because the output javascript file contained require statements which won't work inside a browser
webpack - I tried this but all the code came out wrapped in an annonymous function which I do not want.
Good luck! I imagine it is a very simple fix - probably something todo with the tsconfig.json