-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
How to use without sprockets? #2322
Comments
In order to help debug, could you please post as much as you can of:
|
Hmm. After looking at the error again, it seems that it was because I had some lines in my rails I seem to have things working now. However, it would be good to know where I can find a guide on fully converting from sprockets to webpacker. This need to remove the config lines and update the require statements in Maybe you could have a link or section in your documentation on how to do a full conversion of an existing app from sprockets to webpacker? Having something like that would probably have helped me avoid this issue in the first place. If you have a link or section for that in your documentation, I must have missed it somehow, but searching in your readme for "sprockets" didn't find any mentions of how to convert an app. |
I think https://github.com/rails/webpacker#usage has good content.
There are many detailed ones medium.com. When I switched, I just did
If you find or create a good one, feel free to create a PR. |
I struggled to find high quality content on removing Sprockets fully, too. What I did was Your first hunch seemed right:
So:
yes |
I just ran into this error with a new disabled-sprockets rails app, just because a style-library gem existed in the Gemfile (material-sass/bootstrap), even though the asset-pipeline was disabled. This makes sense, since libraries should be added through npm/yarn versus the gemfile, but is the asset error considered normal behavior in this scenario? It feels a bit misleading because it's coming from a 3rd party asset source. |
I created a new app with the --skip-sprockets flag and im still getting sprockets and sprockets-sass in my gemfile.lock. The only dependency is rails and i have removed the rails/all and replaced with each individual framework (not sprockets) any reason why im still getting sprockets? |
I just tested @MutableLoss's angle and found that the presence of |
Closing for now because it seems to be answered. Feel free to reopen if needed! 👍 |
With the release of Sprockets 4, it apparently requires me to have an
app/assets/config/manifest.js
, which I shouldn't need since I'm using webpacker. However, when I updated myapplication.rb
to exclude the sprockets import, therails webpacker:compile
task no longer worked.What is the recommended method to disable sprockets and use webpacker alone? I'm kind of confused on what I need to do, since excluding the sprockets
require
caused errors in thewebpacker:compile
task.Also, is simply converting all of my JS and CSS assets to webpacker and removeing app/assets enough to no longer need sprockets, or is sprockets involved in the use of webpacker or of regular rails views?
As a note, this app was originally on sprockets, and I converted it to webpacker a while back. There is a chance I may not have properly converted fully away from sprockets, but things have been working fine so far. Is there a guide on fully converting from sprockets to webpacker and removing sprockets from the app?
The text was updated successfully, but these errors were encountered: