🎥 Make videos programmatically with React
How to automatically sync TS aliases
Jonny Burgercf355b4971d9
diff --git a/packages/docs/docs/miscellaneous/ts-aliases.md b/packages/docs/docs/miscellaneous/ts-aliases.mdindex 7f6f7dd9f4..a28b904dad 100644--- a/packages/docs/docs/miscellaneous/ts-aliases.md+++ b/packages/docs/docs/miscellaneous/ts-aliases.md@@ -52,12 +52,31 @@ Config.overrideWebpackConfig((config) => {});```-:::note-Prior to `v3.3.39`, the option was called `Config.Bundling.overrideWebpackConfig()`.-:::-Remember that in Node.JS APIs, the config file does not apply, so you need to add the Webpack override also to the [`bundle()`](/docs/bundle) and [`deploySite()`](/docs/lambda/deploysite) functions.+## Automatically syncing Webpack and TypeScript aliases++To not duplicate the aliases in your Webpack override and in your `tsconfig.json`, you can install `tsconfig-paths-webpack-plugin` and use it:++```ts+import path from "path";+import { Config } from "@remotion/cli/config";+import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin";++Config.overrideWebpackConfig((config) => {+ return {+ ...config,+ resolve: {+ ...replaced.resolve,+ plugins: [+ ...(replaced.resolve?.plugins ?? []),+ new TsconfigPathsPlugin(),+ ],+ },+ };+});+```+## See also- [Overriding webpack config](/docs/webpack)