aziontech/bundler

feat: Custom 404 Error Page for Worker

Closed this issue · 1 comments

Description:

As a Vulcan user I would like to have a custom 404 error page to import into my worker. Currently, when a requested resource is not found, an "Object not found" appears on the screen.

Example:

import { mountSSG, 404NotFound } from "#edge";
  try {
    const myApp = mountSSG(event.request.url, AZION.VERSION_ID);
    const response = await fetch(myApp)
    return response;
  } catch (e) {
    return  404NotFound;
  }

Done!

PR: #36