File tree 1 file changed +3
-4
lines changed
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 {
1947
1947
}
1948
1948
} ) ;
1949
1949
} else {
1950
- // TODO ".mts" is not supported by `interpret`, need to add it
1951
1950
// Prioritize popular extensions first to avoid unnecessary fs calls
1952
- const extensions = [
1951
+ const extensions = new Set ( [
1953
1952
".js" ,
1954
1953
".mjs" ,
1955
1954
".cjs" ,
1956
1955
".ts" ,
1957
1956
".cts" ,
1958
1957
".mts" ,
1959
1958
...Object . keys ( interpret . extensions ) ,
1960
- ] ;
1959
+ ] ) ;
1961
1960
// Order defines the priority, in decreasing order
1962
1961
const defaultConfigFiles = new Set (
1963
1962
[ "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 ) ) ,
1965
1964
) ,
1966
1965
) ;
1967
1966
You can’t perform that action at this time.
0 commit comments