
Create a build plugin/script that generates a /despia/local.json file in the build output directory after compilation. This file should contain a JSON array of all asset paths from the build output.
Requirements:
-
Hook into the build process after all files are written to the output directory
-
Collect all output filenames (JS, CSS, images, fonts, HTML, etc.)
-
Format paths as root-relative (starting with /)
-
Include the entry HTML file (e.g., /index.html) if not already captured
-
Sort paths alphabetically for consistent output
-
Create the despia subdirectory in the output folder if it doesn't exist
-
Write a formatted JSON array (not an object, just the array)
Example output (dist/despia/local.json):
[
"/assets/app.abc123.css",
"/assets/app.def456.js",
"/assets/logo.xyz789.png",
"/index.html"
]
This manifest is used for offline caching in Despia (despia.com) web-native apps.