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

Migrate build/local serving to Vite #150

Closed
10 tasks done
Snugug opened this issue Dec 1, 2021 · 7 comments
Closed
10 tasks done

Migrate build/local serving to Vite #150

Snugug opened this issue Dec 1, 2021 · 7 comments
Assignees
Labels
experience: dx Improvements to developer experience request: update Improvement of existing feature scope: general Pertains to the codebase in general

Comments

@Snugug
Copy link
Collaborator

Snugug commented Dec 1, 2021

Our current Rollup/Gulp combination is slow, cumbersome, and less likely to give us the optimized output we'd want than Vite is, which is optimized for code splitting and modern ES module forward builds.

  • Migrate site serving from Rollup/Gulp/BrowserSync to Vite and Eleventy and ensure Eleventy compiling still works
  • Ensure JS works in dev
  • Ensure Sass works in dev
    • Filed issue that we're currently having
    • Filed PR to help debug error I'm getting
  • Ensure JS compiles for production
    • Regular JS works as expected
    • Workers work as expected
    • Service Worker works
  • Ensure Sass compiles for production
  • Ensure dynamic import polyfill is included (if not already)
  • Make sure Firebase proxies for functions run during dev.
  • Ensure Search indexes compile
@Snugug Snugug added request: update Improvement of existing feature problem: externally blocked Issue cannot be worked on because progress relies on an external dependency experience: dx Improvements to developer experience scope: general Pertains to the codebase in general labels Dec 1, 2021
@Snugug Snugug self-assigned this Dec 1, 2021
@Snugug Snugug removed the problem: externally blocked Issue cannot be worked on because progress relies on an external dependency label Dec 1, 2021
@Snugug
Copy link
Collaborator Author

Snugug commented Dec 1, 2021

Got unblocked on Sass, turns out Squoosh was affecting how Sass gets imported by Vite. Removing Vite Plugin Img made Sass work again!

This means that, for #154, Squoosh will need to be removed as a render option from Vite Plugin Img if we wind up using that module.

@Snugug
Copy link
Collaborator Author

Snugug commented Dec 1, 2021

Need some of the transforms from #143 complete in order to finish this (otherwise required hooks for JS and CSS may not be there!). Kind of a circular dependency situation; needed the 1st half of this to be done to then start on that to then finish this.

@Snugug Snugug added the problem: externally blocked Issue cannot be worked on because progress relies on an external dependency label Dec 14, 2021
@Snugug
Copy link
Collaborator Author

Snugug commented Dec 14, 2021

Compiling of HTML is blocked on vitejs/vite#6113

@Snugug Snugug removed the problem: externally blocked Issue cannot be worked on because progress relies on an external dependency label Dec 15, 2021
@Snugug
Copy link
Collaborator Author

Snugug commented Dec 15, 2021

The PR got merged and I've got a patch that we can apply locally to unblock this for now until the PR lands in a stable branch

@Snugug
Copy link
Collaborator Author

Snugug commented Dec 15, 2021

Featured paint worklet is a little funky but otherwise it looks like our JS, workers, and service worker work as expected.

Filed vite-pwa/vite-plugin-pwa#192 so we don't have to precache all of the HTML

@Snugug
Copy link
Collaborator Author

Snugug commented Dec 15, 2021

Upped to a 21 because this actually was more like a mini epic

Snugug added a commit that referenced this issue Dec 15, 2021
@Snugug
Copy link
Collaborator Author

Snugug commented Dec 15, 2021

With 2a18001 I'm marking this issue closed. The site runs great in both dev and prod builds using the new setup. The service worker still needs work, but we knew that already. Any additional bugs will be filed and worked on independently.

@Snugug Snugug closed this as completed Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experience: dx Improvements to developer experience request: update Improvement of existing feature scope: general Pertains to the codebase in general
Projects
None yet
Development

No branches or pull requests

1 participant