Skip to content
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

Transfer sprockets stuff to new way of doing things for JS and CSS: VITE #748

Closed
jrochkind opened this issue May 11, 2020 · 2 comments
Closed
Assignees
Labels
dependencies Pull requests that update a dependency file maintenance/performance not new features or bugfixes, but keeping/improving the app running well

Comments

@jrochkind
Copy link
Contributor

jrochkind commented May 11, 2020

update: We're going to try to go with vite. https://vite-ruby.netlify.app/


Definitely NOT transfer to webpacker (it turns out), but transfer to... some yet to be determined new way of doing things, possibly for CSS too.

Webpacker has actually been retired. https://github.com/rails/webpacker/

Rails 7 has a new way(s) of doing things (which we should also be able to use in Rails 6.1), involving jsbundling-rails/cssbundling-rails and/or importmaps-rails. (Also see https://github.com/rails/propshaft)

jsbundling-rails lets you use a variety of possible standard JS bundlers -- we might want to use esbuild?

Then we need to do something for our SASS.... sprockets is on it's way out.

@jrochkind jrochkind added dependencies Pull requests that update a dependency file maintenance/performance not new features or bugfixes, but keeping/improving the app running well labels May 11, 2020
@jrochkind
Copy link
Contributor Author

Webpacker is no longer the preferred JS bundler in upcoming Rails 7!

We will want to review the landscape and decide what we really want to do; something to consolidate our JS into just one coherent system would be good, might not be everything in Webpacker after all.

@jrochkind jrochkind changed the title Transfer sprockets stuff to webpacker Transfer sprockets stuff to new way of doing things Jan 20, 2022
@jrochkind jrochkind changed the title Transfer sprockets stuff to new way of doing things Transfer sprockets stuff to new way of doing things for JS and CSS Jan 20, 2022
jrochkind added a commit that referenced this issue Mar 15, 2022
Noticed this output in the webpack JS build log:

```
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
```

So I ran: `npx browserlist@latest --update-db`

It changed the yarnl.lock as so.

Why do we even have caniuse-lite? It's a dependency of autoprefixer, which is an indirect dependency of rails webpacker. (Which is kind of end-of-lifed, and at some point we should switch to a more maintained less hacky Rails JS pipeline. See #748
@jrochkind jrochkind self-assigned this Oct 17, 2022
@jrochkind jrochkind changed the title Transfer sprockets stuff to new way of doing things for JS and CSS Transfer sprockets stuff to new way of doing things for JS and CSS: VITE Oct 17, 2022
@jrochkind
Copy link
Contributor Author

Webpacker=>vite change deployed, via #1882

Would still like to move over Blacklight JS, along with all CSS (including Blacklight) in a subsequent phase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file maintenance/performance not new features or bugfixes, but keeping/improving the app running well
Projects
None yet
Development

No branches or pull requests

1 participant