Skip to content

Commit 32d82e6

Browse files
authored
fix: rspack support (#1699)
* fix: add fallback for rspack * Check for module.getWarnings in Webpack 5 * Update CHANGELOG for version 9.6.1 Add changelog entry for version 9.6.1 with rspack support fix. * Bump ts-loader version to 9.6.1
1 parent 6bd992e commit 32d82e6

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 9.6.1
4+
* [fix: rspack support](https://github.com/TypeStrong/ts-loader/pull/1699) - thanks @johnnyreilly and @bhollis
5+
36
## 9.6.0
47
* [feat: add webpack 4 support back](https://github.com/TypeStrong/ts-loader/pull/1697) - thanks @johnnyreilly and @tweet
58

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ts-loader",
3-
"version": "9.6.0",
3+
"version": "9.6.1",
44
"description": "TypeScript loader for webpack",
55
"main": "index.js",
66
"types": "dist",

src/after-compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ function removeModuleTSLoaderError(
476476
module: webpack.Module,
477477
loaderOptions: LoaderOptions
478478
) {
479-
if (isWebpack5) {
479+
if (isWebpack5 && module.getWarnings) {
480480
const warnings = Array.from(
481481
module.getWarnings() || []
482482
);

0 commit comments

Comments
 (0)