M
M
Moroz982022-02-08 17:40:55
typescript
Moroz98, 2022-02-08 17:40:55

Is it possible to get Nuxt dev server to track and compile ts files?

I am writing a custom server in Express + TypeScript. I would like to configure Nuxt so that it tracks changes in ts-files, compiles them to js and restarts the developer server. In general, everything that happens when editing regular vue files.
At the moment, every time I create or modify ts files, I have to manually shut down the server, run the tsc command, and then npm run dev. It is very uncomfortable.

PS In addition, I would like to clarify one more thing. I create server TS files in the api-ts folder, and compile to the / api folder - from this Nuxt folder and launch the custom server. Am I doing the right thing by separating js and ts into two folders? Or usually they all interfere in one heap? Where is ts created and compiled there?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Moroz98, 2022-02-08
@Moroz98

Here is the answer to my question

A
Alexander, 2022-02-08
@Aleksandr-JS-Developer

Looks like you need nodemon

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question