preactjs-templates / typescript

The TypeScript template for Preact CLI
MIT License
114 stars 38 forks source link

Extremely slow build with fresh project #2

Closed EirikFA closed 2 years ago

EirikFA commented 5 years ago

Generating a fresh project using the CLI with this template the build and development server are extremely slow. Building takes more than two minutes, the same for starting the dev server. This is not a problem using the default Preact CLI template, what could be causing this? Tested on two machines, one with Windows and the other with Ubuntu.

tdreyno commented 5 years ago

Also getting this on OSX Mojave, using the Typescript template

Akiyamka commented 4 years ago

First run

time yarn build
>  Done in 53.36s.

Second run

time yarn build
>  Done in 13.47s.

Fast enough for me.

Host: OS: Fedora release 31 x86_64 CPU: Intel i7-8550U (8) @ 4.000GHz SSD ext4

daniel-j-h commented 2 years ago

Some more anecdata here: on my X1 Carbon laptop

which seems plenty fast to me.

What's interesting though is that subsequent runs of npm run build does not seem to take any build artifacts / caches into account. Is there a reason we clean out build artifacts between subsequent npm run build runs? Is this a preact cli issue?

rschristian commented 2 years ago

I'm going to close this out as it's pretty old.

@daniel-j-h That would be a preact-cli issue, yes.