Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take connect-assets to a next level: why the react community fights on webpack vs browserify? #336

Closed
augnustin opened this issue Jan 28, 2016 · 3 comments

Comments

@augnustin
Copy link
Contributor

Hey there,

I'm a JS lover coming from the Rails world. No need to mention that I love the Rails way to handle assets, which directly implies that I love connect-assets too.

Actually, I think it just works the way it should.

I'm having a lot of fun with React those days. But I cannot find a decent workflow among those suggested by the React community: should I use webpack, or browserify? My answer to this is clearly connect-assets!

Which brings me to the following question:

How come connect-assets isn't so popular in the NodeJS community?

I'm not trying to say the repo badly is managed (course not!) but simply wondering what are the critics addressed to Sprocket and consequently connect-assets? What prevented this behavior to become a best practice in app development?

I can't see any reason for having a second process doing a watch on a bunch of files to regenerate something (implying having several consequences on git) instead of simply having a != js('application') one-liner.

Which brings another question:

How could we bring connect-assets to the fighting arena around browserify and webpack. And if we shouldn't, why not ?

Thanks for considering my opinion, and replying in a constructive way!

And thanks a lot for this repo!

@sahat
Copy link

sahat commented Feb 20, 2016

I am the author of the Hackathon Starter and I wanted to add that I too, love the idea of connect-assets. It works like magic without the complexity of adding and maintaining Gulp tasks and Webpack configs.

Unfortunately, I had to switch away from using connect-assets due to poor performance and especially bad start-up times. It was first brought to my attention in sahat/hackathon-starter#247. After digging into it further I posted some timing resutls in sahat/hackathon-starter#317.

This might not matter as much in production after the initial load, but with nodemon running in the background and automatically restarting the node process on file changes, those seconds really add up, making dev workflow painfully slow.

@augnustin
Copy link
Contributor Author

Good to hear from you @sahat . I actually found out about connect-assets through Hackathon Starter. Very sweet project by the way!

I'm glad you are giving me a factual reason to not using connect-assets. I hear the argument, though I am quite surprised because:

  • I never experienced any slowness there
  • this is a non-issue in production since assets are pre-compiled

But I understand this can be a great pain and a NOGO there. Though what is weird then, is that it is actually usable in Ruby/Sprockets, isn't it?
As far as I am concerned, I can't see any major difference between NodeJS and Ruby that would make the feature available in the latter and not in the former, is there?

Any hint from the maintainer here? @adunkman ?

@stale
Copy link

stale bot commented Jun 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 29, 2019
@stale stale bot closed this as completed Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants