Remove unused 404 handler

The default appType == 'spa' in vite redirects all (unclaimed) paths to /index.html.

If needed, this can be disabled:
https://stackoverflow.com/questions/69701743/how-can-i-configure-vites-dev-server-to-give-404-errors/69711988#69711988
This commit is contained in:
Manav Rathi 2024-04-04 13:58:30 +05:30
parent 756050ae8c
commit ff6d0d32cf
No known key found for this signature in database
4 changed files with 7 additions and 10 deletions

View file

@ -1,9 +0,0 @@
import { Container } from "components/Container";
import React from "react";
import S from "utils/strings";
const Page: React.FC = () => {
return <Container>{S.error_404}</Container>;
};
export default Page;

View file

@ -7,7 +7,6 @@
*/
const S = {
error_generic: "Oops, something went wrong.",
error_404: "404 | This page could not be found.",
};
export default S;

View file

@ -1,5 +1,9 @@
/* Type shims provided by vite, e.g. for asset imports
https://vitejs.dev/guide/features.html#client-types */
/// <reference types="vite/client" />
/** Types for the vite injected environment variables */
interface ImportMetaEnv {
/**
* Override the origin (scheme://host:port) of Ente's API to connect to.

View file

@ -4,6 +4,9 @@
* The base configuration was generated using `yarn create vite`. This was
* already almost the same as the `tsconfig-typecheck.json` we use
* elsewhere, with one or two differences.
*
* For more details about the flags vite cares about, see
* https://vitejs.dev/guide/features.html#typescript-compiler-options
*/
"compilerOptions": {
"target": "ES2020",