pub async fn generate_html(
www_dir: &Path,
import_path: &str,
is_release: bool,
custom_index_html: &Option<PathBuf>,
) -> Result<String, EuvError>Expand description
Generates index.html based on the build profile.
Uses INDEX_HTML_RELEASE when is_release is true (no live-reload script),
otherwise uses INDEX_HTML_DEV (includes live-reload instrumentation).
Then writes the template with the import path placeholder replaced to disk.
§Arguments
&Path- The path to the www directory whereindex.htmlwill be written.&str- The JS import path relative to the www directory (e.g../pkg/euvor./euv).bool- Whether to use the release template (no live-reload).
§Returns
Result<String, EuvError>- The generated HTML content written to disk.