Skip to content

Conversation

zimudec
Copy link

@zimudec zimudec commented Jul 29, 2020

Integrated "fork-ts-checker-webpack-plugin" to analyze typescript errors automatically in the compilation process, without the need to do it manually with tsc (Requires tsconfig.json file in the folder from where it is compiled)

…ors automatically in the compilation process, without the need to do it manually with tsc (Requires tsconfig.json file in the folder from where it is compiled)
@raicem
Copy link
Owner

raicem commented Aug 21, 2020

Thanks @zimudec! That's a great idea.

I am so out of touch with repo, I don't wanna change anything at a whim. I'll take a look once I got some free time and merge it in with a new version.

@zimudec
Copy link
Author

zimudec commented Aug 11, 2021

With laravel-mix 6, this is no longer necessary. With the following code, and the use of the "react()" function, laravel mix integrates it automatically:

const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

mix.webpackConfig({
  plugins: [
    new ForkTsCheckerWebpackPlugin(),
  ],
}).override((webpackConfig) => {
  webpackConfig.resolve.extensions.push(".tsx");
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants