No dist folder output on updated Sage 9 theme

I have an old Sage 9 theme that I was upgrading to webpack 5. I am getting not errors when I run yarn build:production but no dist folder is created. I’ve seen similar issue in the forums but it’s all someone changed the name of the a folder or has an error come up that comes up that would prevent the build from completing.
I’ve tried npm webpack build[:production] --config resources/assets/build/webpack.config.js --stats verbose with no issues coming back. Does this sound familiar to someone? I am not well versed in webpack for sure.

Have you upgraded your old Sage 9.x theme to webpack 5 using the latest commit in Sage 9 branch of Sage repository?

Have you applied this Theme update approach (previously used for the Sage 9.x update branch (Sage "9.1": Please test))?

Updating an existing Sage 9 theme (quick guide)

  1. Create a new Sage 9 project with the command above,
    select the framework that is also used by your own Sage 9 project.
  2. (It is assumed that your own Sage project is already under version control (as git).
    Copy all the files of the newly created, empty Sage 9 project over the ones of your own Sage 9 project,
    overwrite everything. You can skip the vendor/ folder to speed things up slightly.
  3. Use diff/merge tools to resolve any differences, apply your own configuration and adjust it if necessary. Updating to webpack 4 and 5 requires surprisingly little configuration changes.
  4. Invoke composer update or, if there is trouble, remove the composer.lock file (it shouldn’t cause issues most of the time) and invoke composer install.
  5. Invoke npm install, or, if there is trouble, remove the package-lock.json and/or yarn.lock (it shouldn’t cause issues as the base dependencies are already maxed out) and invoke npm install.
    Also note that recent npm is much faster than in the earlier days, so you may want to switch back to npm, but this is up to you.
  6. Invoke npm run build, the theme should build fine, fix your re-applied configuration if otherwise.
  7. Test your theme, styles and images should load as before.
3 Likes

I haven’t, will give this a try. Thanks.