File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1947,21 +1947,20 @@ class WebpackCLI implements IWebpackCLI {
19471947 }
19481948 } ) ;
19491949 } else {
1950- // TODO ".mts" is not supported by `interpret`, need to add it
19511950 // Prioritize popular extensions first to avoid unnecessary fs calls
1952- const extensions = [
1951+ const extensions = new Set ( [
19531952 ".js" ,
19541953 ".mjs" ,
19551954 ".cjs" ,
19561955 ".ts" ,
19571956 ".cts" ,
19581957 ".mts" ,
19591958 ...Object . keys ( interpret . extensions ) ,
1960- ] ;
1959+ ] ) ;
19611960 // Order defines the priority, in decreasing order
19621961 const defaultConfigFiles = new Set (
19631962 [ "webpack.config" , ".webpack/webpack.config" , ".webpack/webpackfile" ] . flatMap ( ( filename ) =>
1964- extensions . map ( ( ext ) => path . resolve ( filename + ext ) ) ,
1963+ [ ... extensions ] . map ( ( ext ) => path . resolve ( filename + ext ) ) ,
19651964 ) ,
19661965 ) ;
19671966
You can’t perform that action at this time.
0 commit comments