Hi everyone,
I know Bud has it’s advantages but I’m lagging behind in understanding how you’d move your entire development environment into WSL so I was wondering it it’d be feasible to just use Laravel Mix?
I went through the documentation of Acorn, Bud and Laravel Mix and all looks good, the only part I didn’t understand was this part:
/**
* Register the theme assets.
*
* @return void
*/
add_action('wp_enqueue_scripts', function () {
bundle('app')->enqueue();
}, 100);
As this calls this within Acorn
/**
* Get bundle from manifest
*
* @param string $bundle
* @param string $manifest
* @return Bundle
*/
function bundle(string $bundle, ?string $manifest = null): Bundle
{
if (! $manifest) {
return \app('assets.manifest')->bundle($bundle);
}
return \app('assets')->manifest($manifest)->bundle($bundle);
}
Is it possible to just set the value of assets.manifest
to mix-manifest.json
?
Looking at this again is it just a case of passing through the name of the file as a string?
Digging further I see where the paths are set:
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Assets Manifest
|--------------------------------------------------------------------------
|
| Here you may specify the default asset manifest that should be used.
| The "theme" manifest is recommended as the default as it cedes ultimate
| authority of your application's assets to the theme.
|
*/
'default' => 'theme',
/*
|--------------------------------------------------------------------------
| Assets Manifests
|--------------------------------------------------------------------------
|
| Manifests contain lists of assets that are referenced by static keys that
| point to dynamic locations, such as a cache-busted location. We currently
| support two types of manifest:
|
| assets: key-value pairs to match assets to their revved counterparts
|
| bundles: a series of entrypoints for loading bundles
|
*/
'manifests' => [
'theme' => [
'path' => get_theme_file_path('public'),
'url' => get_theme_file_uri('public'),
'assets' => get_theme_file_path('public/manifest.json'),
'bundles' => get_theme_file_path('public/entrypoints.json'),
]
]
];
Can these be overwritten or updated?