MWDelaney / sage-acf-wp-blocks

Composer library for generating ACF Gutenberg blocks from templates. Intended for use with Roots/Sage (http://roots.io)
346 stars 66 forks source link

Feature: Enable Bud bundle support / Fix EnqueueStyles & EnqueueScripts #75

Open robmeijerink opened 1 year ago

robmeijerink commented 1 year ago

The current Sage theme comes with Bud by default now, instead of Laravel Mix. Bud uses bundle names to enqueue assets and not paths like before. I made the adjustments so that we can now use the Bud bundles as a value of EnqueueStyles and EnqueueScripts. It would look like this:

EnqueueStyles: nameofbundle
EnqueueScripts: nameofanotherbundle

If the bundle is not found, it will still try to enqueue a path to file in public like before.

I made sure not to break backwards compatibility, so Sage <10 users and Laravel Mix users on older versions will not get in trouble with this update.

Drifterdnl commented 11 months ago

@MWDelaney, could you please accept this pull request? I have tested this and I am using it in my project as a composer patch but would like to remove the patch as I can not use the patch package on my production environment.