-
Notifications
You must be signed in to change notification settings - Fork 0
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
Move as much JS as possible from sprockets to vite #1889
Conversation
OK, just keeping notes on a problem I'm running into....
|
Our sprockets-based stuff right now includes defualt rails-generated "stubs" for ActionCable This is not a Rails feature we have ever used. I'm going to remove it and not copy it over to vite. This will make our JS bundle (trivially) smaller, and our general structure simpler. If we ever wanted ActionCable, we'd have to add it back to our vite config, which might be a bit of a pain to figure out how to do, but cross that bridge when we come to it. |
Don't move it over to vite. We weren't using it. if we ever want to use it, we'll have to figure out how to add it back in via vite
576eaf3
to
973c6c4
Compare
With weird workaround to prevent Blacklight sprockets-included JS from triggering strict mode, which breaks current version of blacklight_range_limit JS
Unclear exactly what default is or how to turn off in prod. ElMassimo/vite_ruby#285
OK at this point in this PR almost all of our JS has been moved over. Some exceptions:
This PR also improves vite configuration a bit:
We also had to put in one weird workaround, to stop the blacklight (sprockets) code from triggering browser JS strict mode, which the blacklight_range_limit (sprockets) code was not compatible with! Once blacklight (sprockets) was FIRST in the sprockets file, it's "use strict" declaration actually worked -- and broke blacklight_range_limit!! At this point, this is ready to merge into the |
To be merged into #1882