File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/react-dependency-scripts/scripts Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 33process . env . NODE_ENV = 'production' ;
44process . env . BABEL_ENV = 'production' ;
55
6- process . on ( 'unhandledRejection' , err => {
6+ process . on ( 'unhandledRejection' , ( err ) => {
77 throw err ;
88} ) ;
99
@@ -14,7 +14,7 @@ const deletePath = require('../utils/deletePath');
1414const resolverPath = require ( '../utils/resolverPath' ) ;
1515const babelConfig = require ( '../configs/babelConfig' ) ;
1616
17- process . on ( 'unhandledRejection' , err => {
17+ process . on ( 'unhandledRejection' , ( err ) => {
1818 throw err ;
1919} ) ;
2020
@@ -27,10 +27,13 @@ console.log(`Create directory:\t${BUILD_PATH}`);
2727
2828const files = readAllFiles ( APP_PATH ) ;
2929
30- files . map ( path => {
30+ files . map ( ( path ) => {
3131 const newPath = path . name . replace ( APP_PATH , BUILD_PATH ) ;
3232 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+ ) {
3437 const result = babel . transformFileSync ( path . name , babelConfig ) ;
3538 fs . appendFileSync ( newPath , result . code ) ;
3639 } else {
You can’t perform that action at this time.
0 commit comments