11import { WebpackConfigWithMetadata , get } from '@easy-webpack/core'
22import * as path from 'path'
3- import { ForkCheckerPlugin , TsConfigPathsPlugin } from 'awesome-typescript-loader'
3+ import { TsConfigPathsPlugin } from 'awesome-typescript-loader'
44
55/**
66 * Typescript loader support for .ts
@@ -11,13 +11,10 @@ export = function typescript({options = undefined, exclude = null} = {}) {
1111 const loader = {
1212 test : / \. t s x ? $ / ,
1313 loader : 'awesome-typescript-loader' ,
14- exclude : exclude || ( this . metadata . root ? [ path . join ( this . metadata . root , 'node_modules' ) ] : [ ] )
14+ exclude : exclude || ( this . metadata . root ? [ path . join ( this . metadata . root , 'node_modules' ) ] : [ ] ) ,
15+ options
1516 } as any
1617
17- if ( options ) {
18- loader . query = options
19- }
20-
2118 return {
2219 resolve : {
2320 extensions : get ( this , 'resolve.extensions' , [ '.js' ] ) . concat ( [ '.ts' ] )
@@ -26,13 +23,6 @@ export = function typescript({options = undefined, exclude = null} = {}) {
2623 rules : get ( this , 'module.rules' , [ ] ) . concat ( [ loader ] )
2724 } ,
2825 plugins : [
29- /*
30- * Plugin: ForkCheckerPlugin
31- * Description: Do type checking in a separate process, so webpack don't need to wait.
32- *
33- * See: https://github.com/s-panferov/awesome-typescript-loader#forkchecker-boolean-defaultfalse
34- */
35- new ForkCheckerPlugin ( ) ,
3626 new TsConfigPathsPlugin ( options )
3727 ] . concat ( get ( this , 'plugins' , [ ] ) )
3828 }
0 commit comments