initial commit

This commit is contained in:
Karli
2025-09-18 19:02:11 +03:00
commit f8a7da141f
55 changed files with 8461 additions and 0 deletions

43
webpack/config.js Normal file
View File

@@ -0,0 +1,43 @@
import { join } from "path";
const port = process.env.PORT || 5005;
const devServerHost = "127.0.0.1";
const devServerUrl = `http://${devServerHost}:${port}/`;
const Environment = {
development: "development",
production: "production",
};
const environment = process.env.NODE_ENV || Environment.production;
const EnvironmentConfig = {
development: "development",
nonprod: "nonprod",
prelive: "prelive",
production: "production",
};
const environmentConfiguration = process.env.ENV_CONFIGURATION || EnvironmentConfig.development;
const isProd = environmentConfiguration === EnvironmentConfig.production;
const isPrelive = environmentConfiguration === EnvironmentConfig.prelive;
const isNonprod = environmentConfiguration === EnvironmentConfig.nonprod;
const isDev = environment === Environment.development
&& environmentConfiguration === EnvironmentConfig.development;
export default {
environment,
environmentConfiguration,
isProd,
isNonprod,
isDev,
isPrelive,
devServer: {
isDevServer: process.env.WEBPACK_IS_DEV_SERVER === "true",
host: devServerHost,
url: devServerUrl,
},
webpack: {
rootDir: join(__dirname, "../"),
},
};
export { EnvironmentConfig };