Consider replacing BrowserSync with Vite

Created on 2 October 2024, 7 months ago

Problem/Motivation

We want to research into the pros/cons of switching to Vite over the current BrowserSync implementation.

🌱 Plan
Status

Active

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jldust

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jldust
  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    I recently posted this starter theme to provide unocss/vite setup out of the box, with lots of instructions for local dev setup.

    https://www.drupal.org/project/unocss_starter β†’

    What about aligning with the Front End Bundler initiative? https://www.drupal.org/about/core/blog/new-community-initiative-frontend... β†’

    From a recent slack conversation, it sounds like Vite and Foxy are the tech currently in the works.

    I am trying to think through a setup issue that may impact others using bundling tools. UnoCSS (Tailwind) needs to parse the code for utility classes to include. If you want to build a base theme with more flexibility, like integrating with a design system, or building assets the same way for module and themes (using shared sass/config), it's unclear how to build the libraries.

    For example, I have a starterkit/base theme used in multiple projects. I want to add some customization for one of the projects I don't want to generate from the starterkit because that would fork the code. I want the subtheme to inherit templates and css unless overridden, but configuring vite to ignore templates that are overridden is difficult.

Production build 0.71.5 2024