When running vite build with the current plugin settings, the generated manifest.json ends up under the nested .vite/ directory (publicDir/build/.vite/manifest.json), but the ColdBox helper (Vite.cfc) by default only looks in publicDir/build/manifest.json. While you can work around this in Vite’s config or by overriding buildDirectory in your ColdBox module config, it would be much more ergonomic if the plugin itself exposed an explicit manifestPath (or similar) option so you can tell the helper exactly where to find the manifest.
Reproduction Steps
- Install and configure the plugin with defaults.
- Run:
- Observe that
manifest.json is emitted to
includes/build/.vite/manifest.json
- In production, ColdBox’s
vite() helper throws:
Manifest file not found. Please run `vite` first.
because it looks for includes/build/manifest.json instead.
Expected Behavior
- The plugin produces
manifest.json in the correct, user‑configurable location.
- Ideally, the plugin’s API would include something like:
coldbox({
input: "src/main.js",
publicDirectory: "includes",
buildDirectory: "build",
manifestPath: ".vite/manifest.json" // new option
})
and the helper would read from that path.
Proposed Solution
- Add a
manifestPath (or manifestDirectory) option to the PluginConfig interface.
- Pass that through to both the Vite
build.manifest setting and write it into the helper’s config.
- Update Vite.cfc to use that configured path when calling
readManifest().
Environment
- coldbox-vite-plugin version: 3.0.2
- Node.js: 22.13.1
- Vite: 6.3.1
- ColdBox: ColdBox 7.3.1+17 on Lucee 6
When running
vite buildwith the current plugin settings, the generatedmanifest.jsonends up under the nested.vite/directory (publicDir/build/.vite/manifest.json), but the ColdBox helper (Vite.cfc) by default only looks inpublicDir/build/manifest.json. While you can work around this in Vite’s config or by overridingbuildDirectoryin your ColdBox module config, it would be much more ergonomic if the plugin itself exposed an explicitmanifestPath(or similar) option so you can tell the helper exactly where to find the manifest.Reproduction Steps
manifest.jsonis emitted tovite()helper throws:includes/build/manifest.jsoninstead.Expected Behavior
manifest.jsonin the correct, user‑configurable location.Proposed Solution
manifestPath(ormanifestDirectory) option to thePluginConfiginterface.build.manifestsetting and write it into the helper’s config.readManifest().Environment