No dist folder output on updated Sage 9 theme

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