@@ -68,33 +68,29 @@ module.exports = [
6868 rules : [
6969 {
7070 test : / \. j s x ? $ / ,
71- exclude : lpackCfg . vars . babelInclude
72- ?
73- (
74- includeRE => ( { test : path => ( isExcluded . test ( path ) && ! includeRE . test ( path ) ) } )
75- ) ( new RegExp ( lpackCfg . vars . babelInclude ) )
76- :
77- isExcluded ,
78- use : {
79- loader : 'babel-loader' ,
80- options : {
81- cacheDirectory : true , //important for performance
82- presets : [
83- [ '@babel/preset-env' ,
84- {
85- ...( lpackCfg . vars . babelPreset || { } )
86- } ] , "@babel/react" ] ,
87- plugins : [
88- [ "@babel/plugin-proposal-decorators" , { "legacy" : true } ] ,
89- [ "@babel/plugin-transform-runtime" , { } ] ,
90- [ "@babel/plugin-proposal-optional-chaining" , { } ] ,
91- [ "@babel/proposal-class-properties" , { loose : true } ] ,
92- "@babel/proposal-object-rest-spread" ,
93- "@babel/plugin-syntax-dynamic-import"
94-
95- ]
96- }
97- }
71+ exclude : isExcluded ,
72+ use : [
73+ {
74+ loader : 'babel-loader' ,
75+ options : {
76+ cacheDirectory : true , //important for performance
77+ presets : [
78+ [ '@babel/preset-env' ,
79+ {
80+ ...( lpackCfg . vars . babelPreset || { } )
81+ } ] ,
82+ '@babel/preset-react'
83+ ] ,
84+ plugins : [
85+ [ "@babel/plugin-proposal-decorators" , { "legacy" : true } ] ,
86+ [ '@babel/plugin-proposal-class-properties' , {
87+ "loose" : true
88+ } ] ,
89+ [ "@babel/plugin-transform-runtime" , { } ] ,
90+ ]
91+ }
92+ } ,
93+ ]
9894 } ,
9995 {
10096 test : / \. ( p n g | j p g | g i f | s v g | w o f f 2 | t t f | e o t ) ( \? .* $ | $ ) $ / ,
@@ -105,16 +101,16 @@ module.exports = [
105101 use : "url-loader?prefix=font/&limit=5000&mimetype=application/font-woff&name=assets/[hash].[ext]"
106102 } ,
107103 { test : / \. h t m l $ / , use : "file-loader?name=[name].[ext]" } ,
108- { test : / \. t p l $ / , loader : "dot-tpl-loader?append=true" } ,
104+ { test : / \. t p l $ / , use : "dot-tpl-loader?append=true" } ,
109105 {
110106 test : / \. ( s c s s | c s s | l e s s ) ( \? .* $ | $ ) $ / ,
111- loader : 'null-loader'
107+ use : 'null-loader'
112108 } ,
113109
114110 { test : / \. o t f ( \? .* $ | $ ) $ / , use : "file-loader?name=assets/[hash].[ext]" } ,
115111 {
116112 test : / \. j s o n ? $ / ,
117- loader : 'strip-json-comments-loader'
113+ use : 'strip-json-comments-loader'
118114 }
119115 ] ,
120116 } ,
@@ -136,7 +132,7 @@ module.exports = [
136132 ...lpackCfg . vars . BundleAnalyzerPlugin
137133 } )
138134
139- ] || [ new webpack . NamedModulesPlugin ( ) ] )
135+ ] || [ ] )
140136 ] ,
141137 }
142138]
0 commit comments