Installing TypeScript in an existing Meteor project


How would I get TypeScript on an existing meteor project? Would anyone have explicit instructions?

I came across this package but it doesn’t say where the config files should go.

Thanks in advance.

Here is what is existing in the meteor documentation:

1 Like

Thanks @rjdavid I tried what the documentation says.

Now I’m having issues with importing tsx files

I’m getting the following error:

Error: Cannot find module '../components/Prototypes/HelloWorld.tsx'

I should add that saving the file as with .jsx, the import works fine.

Thanks in advance!!!

I got it to work.


Add api.use('typescript'); to your package.js file.

If you are using Vulcan.js then here is specifically what I did.

Package.onUse(function (api) {
        // SASS/SCSS support

        // vulcan core

        // vulcan packages

    api.mainModule('lib/server/main.js', 'server');
    api.mainModule('lib/client/main.js', 'client');

I hope this helps someone.