This repository was archived by the owner on Oct 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/react-scripts/config Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,18 @@ const paths = require('./paths');
66const configFactory = require ( './webpack.config' ) ;
77const nodeExternals = require ( 'webpack-node-externals' ) ;
88
9- const pluginFiles = globby . sync ( [ 'plugins/*/index.js' ] , { cwd : paths . appSrc } ) ;
9+ const pluginFiles = globby . sync ( [ 'plugins/*/index.{js,ts}' ] , {
10+ cwd : paths . appSrc ,
11+ } ) ;
1012const pluginEntries = pluginFiles . reduce ( ( acc , plugin ) => {
11- acc [ plugin . replace ( / \. j s $ / , '' ) ] = path . join ( paths . appSrc , plugin ) ;
13+ acc [ plugin . replace ( / \. ( j s | t s ) $ / , '' ) ] = path . join ( paths . appSrc , plugin ) ;
1214 return acc ;
1315} , { } ) ;
14- const presetFiles = globby . sync ( [ 'presets/*/index.js' ] , { cwd : paths . appSrc } ) ;
16+ const presetFiles = globby . sync ( [ 'presets/*/index.{js,ts}' ] , {
17+ cwd : paths . appSrc ,
18+ } ) ;
1519const presetEntries = presetFiles . reduce ( ( acc , preset ) => {
16- acc [ preset . replace ( / \. j s $ / , '' ) ] = path . join ( paths . appSrc , preset ) ;
20+ acc [ preset . replace ( / \. ( j s | t s ) $ / , '' ) ] = path . join ( paths . appSrc , preset ) ;
1721 return acc ;
1822} , { } ) ;
1923
You can’t perform that action at this time.
0 commit comments