Skip to content

Commit

Permalink
feat: update ForkTsCheckerWebpackPlugin which presented random lockin…
Browse files Browse the repository at this point in the history
…g issues with newest 4.x TS versions

* update ForkTsChecker configuration format
* add ForkTsChecker plugin to the excluded plugins list of BabelEsmPlugin (the latter is directly calling apply on all the other plugins, causing unexpected behavior to ForkTsChecker)
  • Loading branch information
kRs committed Jan 27, 2024
1 parent 544f543 commit 90c52e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"envinfo": "^7.8.1",
"esm": "^3.2.25",
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^4.0.4",
"fork-ts-checker-webpack-plugin": "^6.5.3",
"get-port": "^5.0.0",
"gittar": "^0.1.0",
"glob": "^8.0.3",
Expand Down
10 changes: 4 additions & 6 deletions packages/cli/src/lib/webpack/webpack-base-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,10 @@ module.exports = function createBaseConfig(env) {
}),
...(tsconfig
? [
new ForkTsCheckerWebpackPlugin({
checkSyntacticErrors: true,
async: !isProd,
tsconfig: tsconfig,
silent: !isWatch,
}),
new ForkTsCheckerWebpackPlugin({
typescript: {configFile: tsconfig, diagnosticOptions: {semantic: true, syntactic: true} },
async: !isProd
}),
]
: []),
...(isProd
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/webpack/webpack-client-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function getBabelEsmPlugin(env) {
new BabelEsmPlugin({
filename: env.isProd ? '[name].[chunkhash:5].esm.js' : '[name].esm.js',
chunkFilename: '[name].chunk.[chunkhash:5].esm.js',
excludedPlugins: ['BabelEsmPlugin', 'InjectManifest'],
excludedPlugins: ['BabelEsmPlugin', 'InjectManifest', 'ForkTsCheckerWebpackPlugin'],
beforeStartExecution: plugins => {
plugins.forEach(plugin => {
if (
Expand Down

0 comments on commit 90c52e5

Please # to comment.