awesome-typescript-loader icon indicating copy to clipboard operation
awesome-typescript-loader copied to clipboard

Error checker doesn't emit errors on a simple (no change) rebuild

Open roysudi opened this issue 7 years ago • 4 comments

Hello @s-panferov!,

Noticed a strange issue while building my application today. When I run the very first build, the error checker reports all errors & fails the build. However, if I make no changes & re-run my build process, it works. If I open the files, I can still see the errors but they are not reported again unless I make a change in one of the files. Please let me know what is wrong. Configuration: VSCode: 1.19.1 Webpack 3.10.0 ATL: 3.4.1

const commonPlugins = [ new webpack.LoaderOptionsPlugin({ options: { sassLoader: { sourceMap: true, includePaths: ['resources/scss'], context: __dirname } } }), new webpack.IgnorePlugin(/^./locale$/, /moment$/), new webpack.WatchIgnorePlugin([ /static/, /.chunk./ ]), new webpack.NoEmitOnErrorsPlugin(), new HardSourceWebpackPlugin() ] module: { rules: [{ test: /.ts$/, use: [ { loader: 'cache-loader' }, { loader: 'awesome-typescript-loader', options: { configFileName: ./tsconfig${dev ? '.dev' : ''}.json, useCache: true, forceIsolatedModules: true } }, 'angular2-template-loader', 'angular2-router-loader' ] }] }

roysudi avatar Dec 27 '17 10:12 roysudi

I have the same issue. This happens when using this plugin in conjunction with hard-source-webpack-plugin.

If I remove hard-source-webpack-plugin the errors are always reported.

nunof07 avatar Feb 15 '18 23:02 nunof07

As a workaround you can use fork-ts-checker-webpack-plugin instead of the CheckerPlugin from awesome-typescript-loader, while still using the loader from awesome-typescript-loader.

nunof07 avatar Feb 15 '18 23:02 nunof07

It happens for me without hard-source as well. Only way I can make it work is if I delete the atl cache folder and rebuild. So it’s an atl cache issue. fork-ts works asynchronous and hence the errors it reports doesn’t stop/break the build. The developers could easily miss the issues and keep working.. :/

roysudi avatar Feb 16 '18 02:02 roysudi

Async can be turned off in fork-ts-checker-webpack-plugin. See options.

nunof07 avatar Feb 16 '18 07:02 nunof07