diff --git a/index.js b/index.js index b971b73..7579448 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ let mix = require("laravel-mix"); +const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); class ReactTypeScript { constructor() { @@ -49,6 +50,7 @@ class ReactTypeScript { webpackConfig(webpackConfig) { webpackConfig.resolve.extensions.push(".ts", ".tsx"); + webpackConfig.plugins.push(new ForkTsCheckerWebpackPlugin()); } babelConfig() { diff --git a/package.json b/package.json index d4e321d..de1e53d 100644 --- a/package.json +++ b/package.json @@ -22,5 +22,8 @@ "homepage": "https://github.com/raicem/laravel-mix-react-typescript-extension#readme", "peerDependencies": { "laravel-mix": "^4.0.0" + }, + "devDependencies": { + "fork-ts-checker-webpack-plugin": "^5.0.12" } }