Dominic, as a JS/webpack/node.js dev who has come to love Rails, don't
judge webpack by webpackER. Rails devs from the JS/webpack side of things
are just as unhappy with webpackER. (the bloat is real
<https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/rubyonrails-talk/ST2Z8S85CFM>
)

There is a reason why "procedurally generated javascript" is universally
condemned. WebpackER uses YAML to generate a JS file that then compiles
your project JS files. What could go wrong?
[image: image.png]
If you want to use accomplish simple tasks without playing whack-a-mole, I
would check out https://github.com/nikushi/webpack_manifest which was
inspired by https://inside.pixiv.blog/subal/4615. (in english
<https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=https%3A%2F%2Finside.pixiv.blog%2Fsubal%2F4615>
)

If you want to see my reasons for speaking out against webpackER, you can
look at an earlier email thread (
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/rubyonrails-talk/ST2Z8S85CFM)
where I make the case that *webpackER isn't bad*, it just has taken on more
than it can handle.

Last year, DHH asked me <https://twitter.com/dhh/status/1046899322980380673>
to be part of the solution and I
<https://github.com/rails/webpacker/issues/2024#issuecomment-483376636> have
<https://github.com/rails/webpacker/issues/1981#issuecomment-469859415> been
<https://github.com/rails/webpacker/issues/1979#issuecomment-470681411>
trying
<https://github.com/rails/webpacker/issues/2059#issuecomment-486709736> my
<https://github.com/rails/webpacker/issues/1944#issuecomment-464126096> best
<https://github.com/rails/webpacker/issues/1981#issuecomment-469859415>, *but
there are distinct pain points that core maintainers need to start
listening to if they want webpackER to fill Sproket's shoes*. I hope that
we can all fix this.

PS: Try not to use homebrew for installing node, always try and use nvm
<https://github.com/nvm-sh/nvm#installation-and-update> (esp. for mac).

On Wed, May 1, 2019 at 7:43 AM James Robey <james.ro...@gmail.com> wrote:

> Most frontend tooling has a build step now, the build step depends on
> node/npm.   It's much cleaner to separate the javascript/css out from
> sprockets and use webpacker instead.  For example, you'd need this for
> css frameworks like tailwindcss that have a build step to generate
> only the css you need.
>
> I'd disagree that "most" developers are making the mistake of
> installing node as root.  Even homebrew doesn't do that.
>
> I agree there is tension due to the duplication of HTML generation on
> server side vs front-end side.  It's unfortunate.  I'd love it if we
> could have a full fledged SPA using only rails views/templates/logic.
> Otherwise it's forcing us to relegate rails to just an API, and do SSR
> in node instead.
>
> On Wed, May 1, 2019 at 6:33 AM Dominic Son <dominic...@gmail.com> wrote:
> >
> > Rails has always been about best practices in web development, not
> what's popular. If this were the case, why didn't rSpec make it as the
> default test suite in Rails 2?
> >
> > Unfortunately now, Rails 6 will contain bloat. But more concerning,
> leave most web developers vulnerable, as most will unknowingly install Node
> with sudo, making node_modules owned by root, allowing for some fun
> executions..
> >
> > For a moment, Sprockets allowed us to align our Javascript with our MVC
> resources, it was maintainable, good design, that put Rails developers on
> the same page. But starting with Rails 6, we will divide - some into
> Angular, some into React, or Vue, or any of these other exotic front end
> frameworks that repeat yourself in generating HTML.
> >
> > I guess we never really cared about being efficient. It turns out all we
> cared about was job security.
> >
> > - Dominic
> > https://linkedin.com/in/dominicson
> > http://twitter.com/deezzer
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Ruby on Rails: Core" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to rubyonrails-core+unsubscr...@googlegroups.com.
> > To post to this group, send email to rubyonrails-core@googlegroups.com.
> > Visit this group at https://groups.google.com/group/rubyonrails-core.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-core+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-core@googlegroups.com.
> Visit this group at https://groups.google.com/group/rubyonrails-core.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
[image: WarmlyYours] <https://www.warmlyyours.com>
Jake Niemiec
*P:* (800) 875-5285 *F:* (800) 408-1100
Tell us how we're doing
<https://www.warmlyyours.com/survey/customer-satisfaction/quick-survey-25>
and receive $25 off your next order

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to