create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

How do it show me the build time

Open liuzhiyang0113 opened this issue 8 years ago • 4 comments

help me ,please! when i use 'npm run start',it tall me 'Compiled successfully!'. but It didn't tell me how long it took,and create those files? i want to get it,What should I do?

liuzhiyang0113 avatar Sep 27 '18 06:09 liuzhiyang0113

Hey @liuzhiyang0113,

I don't think we show build times for the development builds, but you get build times when running the actual production builds with npm build.

petetnt avatar Sep 27 '18 06:09 petetnt

But I need to optimize the packing time,Is there any way to know?

liuzhiyang0113 avatar Sep 27 '18 07:09 liuzhiyang0113

How long it takes to package the development build is irrelevant, it'll take a little while because it has to bundle a load of things, the live reload, the fancy error page, and a few other things it needs. Once you've ran yarn build, it will be a minimal build of the codebase. Could you elaborate on why you'd like to know the build time other than needing to optimise the packaging time please?

ozzie1998 avatar Sep 27 '18 11:09 ozzie1998

Are you running on macOS or Linux? You can prefix the command with time npm run build.

Alternatively, you can use Yarn and it will tell you the build time at the end.

Timer avatar Sep 27 '18 12:09 Timer