Skip to content

Commit 232c509

Browse files
committed
Merge branch 'docs/guide-native-css-experiments' of https://github.com/phoekerson/webpack.js.org into docs/guide-native-css-experiments
2 parents 26d0bcb + 166da89 commit 232c509

2 files changed

Lines changed: 28 additions & 3 deletions

File tree

src/content/guides/typescript.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,31 @@ export default {
234234

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

237+
### Migrating from `tsconfig-paths-webpack-plugin`
238+
239+
If you're currently using `tsconfig-paths-webpack-plugin`, you can drop it in favor of the built-in `resolve.tsconfig` option:
240+
241+
```diff
242+
- import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
243+
244+
export default {
245+
resolve: {
246+
- plugins: [new TsconfigPathsPlugin()],
247+
+ // Auto-find tsconfig.json in the project root
248+
+ tsconfig: true,
249+
+
250+
+ // Or explicitly point to one
251+
+ // tsconfig: './tsconfig.app.json'
252+
},
253+
};
254+
```
255+
256+
You can then remove the package from your project:
257+
258+
```bash
259+
npm uninstall tsconfig-paths-webpack-plugin
260+
```
261+
237262
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.
238263

239264
## Loader

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6702,9 +6702,9 @@ flatted@^3.2.9:
67026702
integrity sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==
67036703

67046704
follow-redirects@^1.0.0:
6705-
version "1.15.6"
6706-
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
6707-
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
6705+
version "1.16.0"
6706+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.16.0.tgz#28474a159d3b9d11ef62050a14ed60e4df6d61bc"
6707+
integrity sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==
67086708

67096709
for-each@^0.3.3, for-each@^0.3.5:
67106710
version "0.3.5"

0 commit comments

Comments
 (0)