Adding typescript to existing aurelia codebase

Hi,

Does anyone know how to add Typescript to existing Aurelia project, which uses webpack and only currently has js files.

I only want some of my own .ts files to be supported by Typescript. Is this even possible? Right now it looks like it is trying to find my typings in node_modules, however this is a seperate Typings folder in my project.

ERROR in [at-loader] ./node_modules/aurelia-router/dist/aurelia-router.d.ts:3:19 
TS2305: Module '"aurelia-history"' has no exported member 'NavigationOptions'.

How can I configure webpack/tsconfig to look at my typings folder instead of node_modules?

thanks

1 Like

Did you add ts-loader to your WebPack config?

You can take a look at my Aurelia-Slickgrid-Demo WebPack config. That might help you, it was generated by the Aurelia CLI around Christmas time, so it’s fairly recent

1 Like

thanks mate. Using ts-loader worked!

2 Likes