-
Notifications
You must be signed in to change notification settings - Fork 247
fix AssetAliasUsed issue #257
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
Comments
3 tasks
I can confirm this: |
This should be fixed on sprockets-rails 2.3.2. Please give it a try |
@rafaelfranca thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
react-rails
, we add different paths to the asset pipeline based on the app's config. With Sprockets 2 + sprockets-rails 2.3.1, this causesAssetAliasUsed
error.Is this error actually a problem? If not, it would be nice to remove it (or fix the check so it isn't raised in this case) and ship 2.3.2. If it is a problem, what does it mean? Or how should I fix it?
See full conversation, here's my initial report copied from that thread:
react-rails setup
In
react-rails
, app config specifies eitherproduction
ordevelopment
, based on that, we add a path toapp.config.assets.paths
, roughly speaking:(full src)
We do this so that the app only needs
//= react
, then, each environment gets its version of React.js (the development version has nice error messages, the production version has none).error
However, we get an
AssetAliasUsed
from thejavascript_include_tag
helper:Sure enough, these don't match:
Interestingly, if I upgrade to Sprockets 3 + sprockets-rails 2.3.1, I don't get this error (which is fine for me, but not fine for many other
react-rails
users...).Is this the expected outcome? Are we misusing the asset pipeline? Anything else I can do to diagnose or address this?
We're really hoping to support an API where
//= require react
can provide different versions of the file based on environment configs. Previously we copied JS files into local directories, but that had its own issues!Thanks!
The text was updated successfully, but these errors were encountered: