File tree Expand file tree Collapse file tree 3 files changed +224
-4
lines changed
examples/typescript-without-babel Expand file tree Collapse file tree 3 files changed +224
-4
lines changed Original file line number Diff line number Diff line change 1313 "@types/react-dom" : " ^16.9.8" ,
1414 "babel-loader" : " ^8.1.0" ,
1515 "cross-env" : " ^7.0.2" ,
16+ "fork-ts-checker-webpack-plugin" : " ^5.2.1" ,
1617 "html-webpack-plugin" : " ^4.4.1" ,
1718 "react-refresh" : " ^0.8.3" ,
1819 "ts-loader" : " ^8.0.4" ,
Original file line number Diff line number Diff line change 11const path = require ( 'path' ) ;
22const ReactRefreshPlugin = require ( '@pmmmwh/react-refresh-webpack-plugin' ) ;
3+ const ForkTsCheckerWebpackPlugin = require ( 'fork-ts-checker-webpack-plugin' ) ;
34const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
45
56const isDevelopment = process . env . NODE_ENV !== 'production' ;
@@ -19,13 +20,17 @@ module.exports = {
1920 loader : 'babel-loader' ,
2021 options : { plugins : [ 'react-refresh/babel' ] } ,
2122 } ,
22- 'ts-loader' ,
23+ {
24+ loader : 'ts-loader' ,
25+ options : { transpileOnly : true } ,
26+ } ,
2327 ] . filter ( Boolean ) ,
2428 } ,
2529 ] ,
2630 } ,
2731 plugins : [
2832 isDevelopment && new ReactRefreshPlugin ( ) ,
33+ new ForkTsCheckerWebpackPlugin ( ) ,
2934 new HtmlWebpackPlugin ( {
3035 filename : './index.html' ,
3136 template : './public/index.html' ,
You can’t perform that action at this time.
0 commit comments