Reader small image

You're reading from  Drupal 10 Development Cookbook - Third Edition

Product typeBook
Published inFeb 2023
PublisherPackt
ISBN-139781803234960
Edition3rd Edition
Tools
Concepts
Right arrow
Authors (2):
Matt Glaman
Matt Glaman
author image
Matt Glaman

Matt Glaman is an open source developer who has been working with Drupal since 2013. Since then, he has contributed to Drupal core and over 60 community projects. He is also a speaker at multiple Drupal community events, including DrupalCon. Matt is currently a principal software engineer at Acquia and was previously a product lead at Centarro, helping maintain Drupal Commerce.
Read more about Matt Glaman

Kevin Quillen
Kevin Quillen
author image
Kevin Quillen

Kevin Quillen has been working with Drupal since 2006. He's contributed several community modules, and built websites using Drupal for brands such as Dogfish Head Craft Brewery, the National Bureau of Economics, Harvard University, MTV, Yale University, Verizon, the Museum of Science, and countless others. You can find him engaged and helping community members on Slack, Drupal StackExchange, or sharing his thoughts on his personal blog. Kevin is also an Acquia Triple Certified Drupal Expert, an Acquia Certified Site Studio Site Builder, and an Acquia Certified Cloud Platform Pro. He is currently a principal developer and Drupal practice lead at Velir.
Read more about Kevin Quillen

View More author details
Right arrow

Using Laravel Mix to theme your Drupal site with live reloading

In the previous recipe, Compiling CSS and JavaScript pre and post processors with Laravel Mix, we set up Laravel Mix for a theme. Laravel Mix supports Browsersync. Browsersync is a tool that monitors changes in your source files and injects the changes into the browser so that you do not need to refresh the page manually.

In this recipe, we will leverage the BrowserSync functionality to speed up the development of building your Drupal theme.

Getting started

Make sure that aggregation of CSS and JavaScript files is disabled by visiting the Performance configuration form at /admin/config/development/performance.

Alternatively, you can add the following configuration override to your settings.php to force-disable aggregation:

$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;

This...

lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
Drupal 10 Development Cookbook - Third Edition
Published in: Feb 2023Publisher: PacktISBN-13: 9781803234960

Authors (2)

author image
Matt Glaman

Matt Glaman is an open source developer who has been working with Drupal since 2013. Since then, he has contributed to Drupal core and over 60 community projects. He is also a speaker at multiple Drupal community events, including DrupalCon. Matt is currently a principal software engineer at Acquia and was previously a product lead at Centarro, helping maintain Drupal Commerce.
Read more about Matt Glaman

author image
Kevin Quillen

Kevin Quillen has been working with Drupal since 2006. He's contributed several community modules, and built websites using Drupal for brands such as Dogfish Head Craft Brewery, the National Bureau of Economics, Harvard University, MTV, Yale University, Verizon, the Museum of Science, and countless others. You can find him engaged and helping community members on Slack, Drupal StackExchange, or sharing his thoughts on his personal blog. Kevin is also an Acquia Triple Certified Drupal Expert, an Acquia Certified Site Studio Site Builder, and an Acquia Certified Cloud Platform Pro. He is currently a principal developer and Drupal practice lead at Velir.
Read more about Kevin Quillen