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
Unable to use browserify.yml and commandline_options together #63
Comments
What version of browserify are you using? There have been some issues with recent versions and you may need to try browserify v4. Can you do so -- more about that here: browserify/browserify#1019 |
@cymen - I'm using v6.3.4 (the browserify-rails docs said to use It looks like they're up to v9.0.7 now. Does this gem plan to support newer versions of browserify? I'll try experimenting with different versions tonight. |
@lynndylanhurley I realize but try the v4 browserify to determine if that is the issue. If it is that, it appears to be an issue outside of this gem and needs to be fixed outside. |
I'll try to get some time to reproduce it locally and look too. |
got this myself. it doesn't seem to be a problem with browserify, but rather with the gem itself. It looks like the options in broswerify.yml are being used in lib/browserify-rails/browserify_processor.rb: def run_browserify(logical_path=nil, extra_options=nil, force_browserifyinc=nil)
command_options = "#{options} #{extra_options} #{granular_options(logical_path)}".strip but at this point, |
Nevermind. I got it. Given this: javascript:
deps:
require:
- 'react'
application:
external:
- 'react' Your /* module.exports */ because otherwise, browserify-rails will skip that file for processing. |
I'm trying to split my bundle into two files:
deps
andapplication
.Here is my
deps
file:And here is my
application
file:Here is my
commandline_options
setting:Here is my
browserify.yml
:Here is the output:
So it doesn't look like the
external
options from thebrowserify.yml
file are being sent to browserify.When I remove the
commandline_options
setting, therequire
andexternal
options are passed to browserify, but obviously thereactify
transform doesn't run and the build fails.I've also tried adding a
transform
option to thebrowserify.yml
file like this:But the transform doesn't run and the build fails.
Please let me know if I'm doing something wrong here.
When I tried to debug this I made it to this line. I was expecting the
get_granular_config
method to return the configuration defined in thebrowserify.yml
file, but thelogical_path
value was alwaysnil
soget_granular_config
always returnednil
.The text was updated successfully, but these errors were encountered: