File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
packages/build-next-bricks Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ export interface BuildNextBricksConfig {
8989 imageAssetFilename ?: string | ( ( pathData : any , assetInfo : any ) => string ) ;
9090 plugins ?: Configuration [ "plugins" ] ;
9191 moduleRules ?: RuleSetRule [ ] ;
92+ oneOfRulesForBabel ?: RuleSetRule [ ] ;
9293 resolve ?: ResolveOptions ;
9394 exposes ?: ConstructorParameters <
9495 typeof container . ModuleFederationPlugin
Original file line number Diff line number Diff line change @@ -358,12 +358,17 @@ async function getWebpackConfig(config) {
358358 ] ,
359359 } ,
360360 {
361- test : / \. [ t j ] s x ? $ / ,
362- loader : "babel-loader" ,
363- exclude : / n o d e _ m o d u l e s | \. d \. t s $ / ,
364- options : {
365- rootMode : "upward" ,
366- } ,
361+ oneOf : [
362+ ...( config . oneOfRulesForBabel ?? [ ] ) ,
363+ {
364+ test : / \. [ t j ] s x ? $ / ,
365+ loader : "babel-loader" ,
366+ exclude : / n o d e _ m o d u l e s | \. d \. t s $ / ,
367+ options : {
368+ rootMode : "upward" ,
369+ } ,
370+ } ,
371+ ] ,
367372 } ,
368373 {
369374 // Images
You can’t perform that action at this time.
0 commit comments