Using /imports/ui slows down development compared to /client/...?

I’ve been placing React components in /client/components and any time I make a change, the Meteor process just displays a Client refreshed message and hot reloads the browser almost immediately.

But then I saw recommendations that since Meteor 1.3, you’re supposed to put your UI components in /imports/ui. I tried migrating over, but all changes to those components require a full application refresh – this process takes at least 5-10 more seconds and makes small adjustments to a component quite slow to adjust.

Is this the intended behavior or is there some config option I’m missing?

The suggested workaround for this is to use imports/client/ui/, since any client/ folder works in the same way as a project root’s client/ folder.

Also keep in mind that in Meteor 1.4.2 rebuild times will be much faster, so it may become a non-issue for you :slight_smile:.

1 Like

Ah great, that works - thanks! So is it now common to have nothing inside the root /client and /server other than your main.js?

Those are really big improvements on those benchmarks… I’m definitely not seeing an equal rebuild time for my client and server!

Well it really depends on the project you have and also on your hardware. I have a quite fast SSD in my machine :slight_smile:.

Yes, it’s quite common nowadays with the new imports system.

Just a quick question: Does /client/imports/ui also work?

As I understand it, anything you put in client/ gets automatically concatenated, so there wouldn’t really be a point to nesting imports in there.

MBP 2015 8GB apparently ain’t so hot :slight_smile:

I also have a MBP 2015 8GB, with 512GB :slight_smile:

That would also work. An imports/ folder will be ignored wherever it appears in the directory hierarchy.