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

Live Reload and dev build times #614

Closed
gregrickaby opened this issue Mar 24, 2021 · 1 comment · Fixed by #618
Closed

Live Reload and dev build times #614

gregrickaby opened this issue Mar 24, 2021 · 1 comment · Fixed by #618

Comments

@gregrickaby
Copy link
Contributor

gregrickaby commented Mar 24, 2021

The Problems

  • During active development of client project with wd_s, Live Reload can take 3-6+ seconds to display changes.
  • This adds up throughout the day + weeks.
  • The root cause is how Tailwind works along with Purge CSS.
  • The devs behind Tailwind are working on a solution to this problem.
  • There are no editor styles, so our blocks don't look like the frontend.
  • Are we expected to write our styles twice? Are engineers supposed to make design decisions when it comes to the admin side of blocks?
  • Styling blocks for the editor also takes time and eats into the budget.
  • Also, I feel like our NPM scripts are getting a bit out of control. There are so many, which do we run? Why are we calling wds-scripts which is just a wrapper for wordpress-scripts?

Discussion Topics

  • Is there anything we can do to decrease incremental dev build times?
  • What can we do about editor styles?
  • Is there an expectation for engineers to make design decisions?
  • Can we simplify our NPM scripts?
@michealengland
Copy link
Contributor

michealengland commented Mar 24, 2021

Even though we're likely going a different direction, here is a spike branch that does the following:

Note: Rebuild times appear to range from 3500ms to 4000ms on my local. Which is not much more than before these changes.

  1. Abstract Tailwind into a separate webpack entry.
  2. Creates style.scss and editor.scss for importing styles
  3. Update enqueues similar to Separate Theme & Editor Stylesheets #600 since these updates are very tightly coupled with this update
  4. Add @tailwind base; to style.scss and editor.scss so that we can control the behavior behind this feature and address some concerns around selector name scoping.

See spike/mle-abstract-tailwind-imports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants