Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/content/guides/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,31 @@ export default {

With the above, `@/components/Button` resolves to `src/components/Button` without any additional plugins or duplicating aliases in `resolve.alias`.

### Migrating from `tsconfig-paths-webpack-plugin`

If you're currently using `tsconfig-paths-webpack-plugin`, you can drop it in favor of the built-in `resolve.tsconfig` option:

```diff
- import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';

export default {
resolve: {
- plugins: [new TsconfigPathsPlugin()],
+ // Auto-find tsconfig.json in the project root
+ tsconfig: true,
+
+ // Or explicitly point to one
+ // tsconfig: './tsconfig.app.json'
},
};
```

You can then remove the package from your project:

```bash
npm uninstall tsconfig-paths-webpack-plugin
```

W> `resolve.tsconfig` only handles module resolution — it does not transpile TypeScript. You still need `ts-loader`, `babel-loader` with `@babel/preset-typescript`, or another transpilation step.

## Loader
Expand Down
Loading