Setting up for theme development
Drupal gives you several tools to help you develop your theme, but you’ll need to enable them. Theme development capabilities should only be enabled on development systems, not production.
Disabling CSS and JS aggregation
Drupal will bundle CSS and JS files together. While this is great for performance, it makes development difficult. To disable this, navigate to Admin | Configuration | Development | Performance. You’ll end up at admin/config/development/performance
. The following figure shows the options for Aggregate CSS files and Aggregate JavaScript files:
Figure 19.1 – Aggregation settings
Note you can also disable these via code, by adding the following to your sites/default/settings.php
file:
$config['system.performance']['css']['preprocess'] = FALSE; $config['system.performance']['js']['preprocess'] = FALSE;
That ensures...