webpack-rails icon indicating copy to clipboard operation
webpack-rails copied to clipboard

Relax assumptions in webpack:compile rake tasks

Open pariser opened this issue 9 years ago • 4 comments

  • Don't assume that ::Rails.configuration.webpack.binary specifies a webpack path relative to Rails root.
  • Don't assume that we know the exact webpack binary location (allow webpack executable to be on $PATH, in which case we no longer die with a File.exist? error).

pariser avatar Sep 21 '16 22:09 pariser

I like this, but it needs to support the current configuration by default so that it doesn't break for existing users.

In our configuration we don't install webpack (or webpack dev server) globally.

mipearson avatar Oct 06 '16 22:10 mipearson

If the compile script leveraged an npm task then I think this can completely be avoided? Perhaps there should be a npm run webpack:compile task which compiles with a production flag(s).

juanca avatar Oct 07 '16 17:10 juanca

I'm going to be bringing this in to an API-breaking 1.0-pre branch shortly.

The delay on this (and other) pull requests is that I've been cautious to merge anything that could break functionality for existing users.

mipearson avatar Oct 26 '16 22:10 mipearson

Cool! Let me know if and how I can help with this.

pariser avatar Oct 26 '16 23:10 pariser