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

@ -255,7 +255,6 @@ import {
isTransparent,
easeToValuesRAF,
muteFSAbortError,
isTestEnv,
easeOut,
} from "../utils";
import {
@ -1596,7 +1595,10 @@ class App extends React.Component<AppProps, AppState> {
this.excalidrawContainerValue.container =
this.excalidrawContainerRef.current;
if (import.meta.env.MODE === ENV.TEST || import.meta.env.DEV) {
if (
process.env.NODE_ENV === ENV.TEST ||
process.env.NODE_ENV === ENV.DEVELOPMENT
) {
const setState = this.setState.bind(this);
Object.defineProperties(window.h, {
state: {
@ -1634,7 +1636,7 @@ class App extends React.Component<AppProps, AppState> {
// bounding rects don't work in tests so updating
// the state on init would result in making the test enviro run
// in mobile breakpoint (0 width/height), making everything fail
!isTestEnv()
process.env.NODE_ENV !== "test"
) {
this.refreshDeviceState(this.excalidrawContainerRef.current);
}
@ -8160,7 +8162,10 @@ declare global {
}
}
if (import.meta.env.MODE === ENV.TEST || import.meta.env.DEV) {
if (
process.env.NODE_ENV === ENV.TEST ||
process.env.NODE_ENV === ENV.DEVELOPMENT
) {
window.h = window.h || ({} as Window["h"]);
Object.defineProperties(window.h, {