on GitHub" data-tooltip-id=":Rblcldtb:">v2.6·
By default, Medusa doesn't support TypeScript aliases in production.
If you prefer using TypeScript aliases, install following development dependencies:
Where tsc-alias
is a package that resolves TypeScript aliases, and rimraf
is a package that removes files and directories.
Then, add a new resolve:aliases
script to your package.json
and update the build
script:
You can now use TypeScript aliases in your Medusa application. For example, add the following in tsconfig.json
:
Now, you can import modules, for example, using TypeScript aliases: