Local dev with typescript

I wonder if it’s possible to use the local environment dev with Typescript, meaning creating files like index.2.ts into localDev/src/ and be able to browse them like we do with .js files (http://localhost:1338/localDev/index.html?sample=2)?

That would be nice if the directory could be watched by webpack, so that the files are automatically recompiled when changed.

Not at all at the moment but nothing prevents you to simply add ts file in the folder and launch an extra cmd with watch on those files (tsc -w) there is no need of webpack for that.

I tried that, but I got a bunch of errors, maybe because I had to set the rootDir in tsconfig.json to ../../, else I had the “'rootDir' is expected to contain all source files.” error wheb setting rootDir=./.

That’s because I import the Babylon files with import { Engine } from "../../src/Engines/engine";, but I don’t think it’s possible to do it in another way?

In any case, I’m going to create a specific project for my Babylon experiments, I know it will work.

Thanks for your help!

If you rely on imports yes it would be way easier.