File tree 1 file changed +7
-4
lines changed
packages/react-dependency-scripts/scripts
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 3
3
process . env . NODE_ENV = 'production' ;
4
4
process . env . BABEL_ENV = 'production' ;
5
5
6
- process . on ( 'unhandledRejection' , err => {
6
+ process . on ( 'unhandledRejection' , ( err ) => {
7
7
throw err ;
8
8
} ) ;
9
9
@@ -14,7 +14,7 @@ const deletePath = require('../utils/deletePath');
14
14
const resolverPath = require ( '../utils/resolverPath' ) ;
15
15
const babelConfig = require ( '../configs/babelConfig' ) ;
16
16
17
- process . on ( 'unhandledRejection' , err => {
17
+ process . on ( 'unhandledRejection' , ( err ) => {
18
18
throw err ;
19
19
} ) ;
20
20
@@ -27,10 +27,13 @@ console.log(`Create directory:\t${BUILD_PATH}`);
27
27
28
28
const files = readAllFiles ( APP_PATH ) ;
29
29
30
- files . map ( path => {
30
+ files . map ( ( path ) => {
31
31
const newPath = path . name . replace ( APP_PATH , BUILD_PATH ) ;
32
32
if ( path . isFile ) {
33
- if ( path . name . match ( '^.+\\.(js|jsx|ts|tsx)$' ) ) {
33
+ if (
34
+ path . name . match ( '^.+\\.(js|jsx|ts|tsx)$' ) &&
35
+ ! path . name . match ( '^.+\\.d.ts$' )
36
+ ) {
34
37
const result = babel . transformFileSync ( path . name , babelConfig ) ;
35
38
fs . appendFileSync ( newPath , result . code ) ;
36
39
} else {
You can’t perform that action at this time.
0 commit comments