Webpacker presents a more difficult OOB experience for JS Sprinkles than Sprockets did

I’ve thought about this a lot as well and keep coming back to these ideas:

  • No question that there is a simplicity with sprockets that is way easier to use. The idea that you just have a folder that you can dump stuff into and “it just works” is wonderful.
  • There is also no question in my mind that it’s substantially more limited in terms of what you can do and the speed at which you can do it.
  • There is a real tension in my mind as well that Sprockets is totally out of line with where everything seems to be moving in the world of front end.

To me and I would assume many others the ideal outcome would be the ease of sprockets with the advantages of webpack.

I don’t think sprockets alone is realistically going to bridge that gap by itself. There’s way too much underlying infrastructure that has gone into Webpack from a much broader community that allows us to do all of the interesting stuff that it provides.

Instead I would really like to think about how to make Webpacker more like sprockets rather than continuing this dual use strategy where JS is processed through one pipeline and all other static assets through another.

The first obvious thing to me is approaching this from a documentation point of view. Not necessarily in the sense of “here’s what you need to know about webpacker to really get deep into it” but more “here are a bunch of essentially copy and paste recipes that will allow you to have a seamless experience in the same way you have now with Sprockets.

It’s possible (afaik) to configure things so that we can get back to the level of “just put your files in this folder and it magically works” and I think that is totally a good enough experience for most people right now. Then for those who want to use the “full power” of Webpack well we expose the config internals enough that you can do that as well if you like.

Perhaps that should be the “default” webpacker experience or put it behind a flag I don’t think it matters.

However, I feel like I have massively over simplified this and it’s super realistic I’m missing pieces of the puzzle here. Would be happy to learn what they are though :slight_smile:

14 Likes