Problem/Motivation

We use a flat directory structure for our dist folder where everything is just put into dist with no subfolders, both the assets and the manifest.
This was broken when we upgraded because the backwards compatibility for the manifest setting extracts the wrong path and looks for /var/www/html/docroot/themes/custom/numiko/.vite/manifest.json instead of /var/www/html/docroot/themes/custom/numiko/dist/manifest.json

Steps to reproduce

Use vite with these build options:

build: {
      manifest: 'manifest.json',
      outDir: '../dist',
      assetsDir: './', // Output assets directly inside 'dist/' no subfolder
}

With the default Drupal vite yaml settings.

Proposed resolution

Allow the manifest path relative to dist to be configured with a new optional parameters that by default would be .vite/manifest.json.

Remaining tasks

  • I'll create a merge request for the maintainers to review

Issue fork vite-3552017

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

aurora-norris created an issue. See original summary.

aurora-norris’s picture

Status: Active » Needs review

wotnak made their first commit to this issue’s fork.

wotnak’s picture

Status: Needs review » Fixed

Made some changes in the MR:

  • renamed manifestOverride to manifestPath
  • added backward compatibility for the deprecated manifest config option
  • updated README to include info about the new config option and backward compatibility

Merged and released in 1.5.2.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.