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');
6
6
const configFactory = require ( './webpack.config' ) ;
7
7
const nodeExternals = require ( 'webpack-node-externals' ) ;
8
8
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
+ } ) ;
10
12
const 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 ) ;
12
14
return acc ;
13
15
} , { } ) ;
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
+ } ) ;
15
19
const 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 ) ;
17
21
return acc ;
18
22
} , { } ) ;
19
23
You can’t perform that action at this time.
0 commit comments