enqueueCss doesn't work for yarn dev (but it does for yarn build)

I have an extra css set up (without js) for woocommerce (woocommerce.css).
In bud.config

      app: ["@scripts/app", "@styles/app"],
      editor: ["@scripts/editor", "@styles/editor"],
      woocommerce: ["@styles/woocommerce"],

Then, in setup.php:

add_action('wp_enqueue_scripts', function () {

    if (is_account_page() || is_cart() || is_checkout()) {
}, 100);

If I use enqueue() it works apparently but generates a reload on Chrome because no woocommerce.js was found and thus loading the same app.js twice. If I use enqueueCss() it doesn’t work while yarn dev but it does work when yarn build.

I guess there is a bug in acorn and another one in bud.

You should consider refactoring your setup based on this comment about bundles from @kellymears

1 Like

Probably it was an old bug. I ran composer update and updated bud too and now using enqueue() without caring if there is a js file or not works.

I was on Sage 10.2, updated to 10.3.1