There is a project based on bedrock. Some time ago, a sage-based theme was added to it.
Now I need to add a new plugin to the project, and I’d like to use the bud.js to build all the assets.
I rewrote the bud.config.js using bud.make()
that it independently builds the asserts for the theme and for the plugin. In both cases, I get a public folder with the source files.
export default async (bud) => {
await bud.make(
{label: 'theme'},
async (theme) => {
theme.entry('theme-entry', ['path/to/file'])
theme.setPublicPath('/app/themes/theme/public/');
}
);
await bud.make(
{ label: 'plugin' },
async (plugin) => {
plugin.entry('plugin-entry', ['path/to/file'])
plugin.setPublicPath( `/app/plugins/plugin/public/` );
}
)
};
I don’t understand how I can enqueue the plugin’s assets. Roots\bundle() only sees the entries from the theme.