PHP code example of catchdigital / drucker
1. Go to this page and download the library: Download catchdigital/drucker library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
catchdigital / drucker example snippets
/**
*
* Implements hook_library_info_alter() for webpack chunks dependencies.
*/
function hook_library_info_alter(&$libraries, $extension) {
// We only want to modify current theme extensions
if ($extension === '${theme}') {
// Load chunks dependencies from stats file.
$stats = file_get_contents(DRUPAL_ROOT . "/../webpack.stats.json");
$stats = Json::decode($stats);
// Create and attach code splits.
foreach($stats['namedChunkGroups'] as $name => $lib) {
// Loop through $filename => []
]
];
$excludedLibraries = ["500", "396"];
if (in_array($