You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It so happens that browserify-rails uses the same CLI options for checking the dependencies and actually compiling the file.
-d is not necessary when checking dependencies
--list is not necessary when compiling the end file
I noticed the issue since I was trying to use minifyify as a plugin. I added the CLI arguments for it. The plugin crashes since it doesn't get the source map when browserify-rails is checking for dependencies (I honestly have no idea why). I modified the gem locally to add compile_commandline_options that are only applied when run_browserify is called for compilation. It's most likely a wrong implementation, it was only meant to be a test. It worked.
I'm not sure how best to do the distinction. Some transforms like CoffeeScript compilation are quite useful every time browserify will be ran within the browserify-rails process (or else it might crash).
The text was updated successfully, but these errors were encountered:
Yes, I think this causes problems sometimes passing the same arguments to both. I thought this was my problem when trying to use a transform but it turned out to be unrelated. However, it is going to make configuration tricky.
Stepping back, using minifyify at the browserify level when using Rails probably doesn't make sense. That kind of processing should be hooked up later in the asset pipeline and it would be used when you generate the static assets (rake assets:precompile) for production. Does that make sense? It should be possible to do but given we are in Rails, it might not make sense.
I think we should get it to work. For my project, in development, I want source maps and don't care about asset size. For production, I do not want source maps and am worried about asset size. This other issue has a little more details on Rails 4 and asset compilation:
It so happens that browserify-rails uses the same CLI options for checking the dependencies and actually compiling the file.
-d
is not necessary when checking dependencies--list
is not necessary when compiling the end fileI noticed the issue since I was trying to use
minifyify
as a plugin. I added the CLI arguments for it. The plugin crashes since it doesn't get the source map when browserify-rails is checking for dependencies (I honestly have no idea why). I modified the gem locally to addcompile_commandline_options
that are only applied whenrun_browserify
is called for compilation. It's most likely a wrong implementation, it was only meant to be a test. It worked.I'm not sure how best to do the distinction. Some transforms like CoffeeScript compilation are quite useful every time
browserify
will be ran within the browserify-rails process (or else it might crash).The text was updated successfully, but these errors were encountered: