revert: "build: Migrate to Vite 🚀" (#6814)

Revert "build: Migrate to Vite 🚀 (#6713)"

This reverts commit e93bbc5776.
This commit is contained in:
Aakansha Doshi 2023-07-26 22:34:06 +05:30 committed by GitHub
parent dcc75ed007
commit 8104068bd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
100 changed files with 9758 additions and 6012 deletions

View file

@ -1,5 +1,6 @@
import fallbackLangData from "./locales/en.json";
import percentages from "./locales/percentages.json";
import { ENV } from "./constants";
import { jotaiScope, jotaiStore } from "./jotai";
import { atom, useAtomValue } from "jotai";
import { NestedKeyOf } from "./utility-types";
@ -73,7 +74,7 @@ export const languages: Language[] = [
];
const TEST_LANG_CODE = "__test__";
if (import.meta.env.DEV) {
if (process.env.NODE_ENV === ENV.DEVELOPMENT) {
languages.unshift(
{ code: TEST_LANG_CODE, label: "test language" },
{
@ -144,7 +145,7 @@ export const t = (
if (translation === undefined) {
const errorMessage = `Can't find translation for ${path}`;
// in production, don't blow up the app on a missing translation key
if (import.meta.env.PROD) {
if (process.env.NODE_ENV === "production") {
console.warn(errorMessage);
return "";
}