laravel-mix-react-typescript-extension
laravel-mix-react-typescript-extension copied to clipboard
Integrated "fork-ts-checker-webpack-plugin"
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)
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.
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");
});