build: Konfiguration für statische Exporte mit Umgebungsvariable optimiert
- output: "export" wird jetzt automatisch bei EXPORT_STATIC=true aktiviert - Entwicklungsmodus (npm run dev) nutzt weiterhin API-Routen für Mock-Tests - Neues npm-Skript nutzt cross-env für Umgebungsunabhängigkeit bei Windows/Linux - cross-env als devDependency hinzugefügt
This commit is contained in:
@@ -3,3 +3,4 @@ NEXT_PUBLIC_ENCRYPTION_KEY=1
|
|||||||
NEXT_PUBLIC_ENCRYPTION_IV=1
|
NEXT_PUBLIC_ENCRYPTION_IV=1
|
||||||
NEXT_PUBLIC_USE_MOCK_BACKEND_TDR_START=true
|
NEXT_PUBLIC_USE_MOCK_BACKEND_TDR_START=true
|
||||||
NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
||||||
|
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
NEXT_PUBLIC_NODE_ENV=production
|
NEXT_PUBLIC_NODE_ENV=production
|
||||||
NEXT_PUBLIC_ENCRYPTION_KEY=1
|
NEXT_PUBLIC_ENCRYPTION_KEY=1
|
||||||
NEXT_PUBLIC_ENCRYPTION_IV=1
|
NEXT_PUBLIC_ENCRYPTION_IV=1
|
||||||
NEXT_PUBLIC_CPL_API_PATH=/CPL
|
NEXT_PUBLIC_CPL_API_PATH=/CPL
|
||||||
|
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||||
@@ -1,4 +1,15 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
win_kueID?: string[];
|
||||||
|
win_kueLimit1?: number[];
|
||||||
|
win_kueDelay1?: number[];
|
||||||
|
win_kueLimit2Low?: number[];
|
||||||
|
win_kueLimit2High?: number[];
|
||||||
|
win_kueLoopInterval?: number[];
|
||||||
|
}
|
||||||
|
}
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import type { RootState } from "../../../../../redux/store";
|
import type { RootState } from "../../../../../redux/store";
|
||||||
import { setKueData } from "../../../../../redux/slices/kueDataSlice";
|
import { setKueData } from "../../../../../redux/slices/kueDataSlice";
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const webVersion = "1.6.247";
|
const webVersion = "1.6.248";
|
||||||
export default webVersion;
|
export default webVersion;
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
|
|
||||||
|
const isExport = process.env.EXPORT_STATIC === "true";
|
||||||
|
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
reactStrictMode: true, // Aktiviert Strict Mode zur Identifizierung potenzieller Probleme in der Anwendung
|
reactStrictMode: true,
|
||||||
//output: "export", // Stellt sicher, dass Next.js eine statische Version der Website generiert (SSG)
|
trailingSlash: false,
|
||||||
trailingSlash: false, // Fügt einen Schrägstrich am Ende der URLs hinzu (nützlich für statische Verzeichnisse)
|
|
||||||
images: {
|
images: {
|
||||||
unoptimized: true, // Verzichtet auf Next.js' Bildoptimierung (nützlich für statische Exporte)
|
unoptimized: true,
|
||||||
},
|
},
|
||||||
|
...(isExport && { output: "export" }), // ⬅️ dynamisch aktivieren
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|||||||
19
package-lock.json
generated
19
package-lock.json
generated
@@ -56,6 +56,7 @@
|
|||||||
"@types/react-modal": "^3.16.3",
|
"@types/react-modal": "^3.16.3",
|
||||||
"@types/redux-mock-store": "^1.5.0",
|
"@types/redux-mock-store": "^1.5.0",
|
||||||
"@types/testing-library__react": "^10.2.0",
|
"@types/testing-library__react": "^10.2.0",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
"cypress": "^14.0.0",
|
"cypress": "^14.0.0",
|
||||||
"husky": "^8.0.0",
|
"husky": "^8.0.0",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"identity-obj-proxy": "^3.0.0",
|
||||||
@@ -3181,6 +3182,24 @@
|
|||||||
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/cross-env": {
|
||||||
|
"version": "7.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",
|
||||||
|
"integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"cross-spawn": "^7.0.1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"cross-env": "src/bin/cross-env.js",
|
||||||
|
"cross-env-shell": "src/bin/cross-env-shell.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.14",
|
||||||
|
"npm": ">=6",
|
||||||
|
"yarn": ">=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/cross-spawn": {
|
"node_modules/cross-spawn": {
|
||||||
"version": "7.0.6",
|
"version": "7.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||||
|
|||||||
@@ -5,12 +5,13 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"clean": "rimraf .next out",
|
"clean": "rimraf .next out",
|
||||||
"build": "npm run clean && next build",
|
"build": "npm run clean && cross-env EXPORT_STATIC=true next build && next export",
|
||||||
"postbuild": "copy LICENSE_ICONIFY.txt out\\LICENSE_ICONIFY.txt",
|
"postbuild": "copy LICENSE_ICONIFY.txt out\\LICENSE_ICONIFY.txt",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"prepare": "husky install"
|
"prepare": "husky install",
|
||||||
|
"export": "cross-env EXPORT_STATIC=true next build && next export"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
@@ -61,6 +62,7 @@
|
|||||||
"@types/react-modal": "^3.16.3",
|
"@types/react-modal": "^3.16.3",
|
||||||
"@types/redux-mock-store": "^1.5.0",
|
"@types/redux-mock-store": "^1.5.0",
|
||||||
"@types/testing-library__react": "^10.2.0",
|
"@types/testing-library__react": "^10.2.0",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
"cypress": "^14.0.0",
|
"cypress": "^14.0.0",
|
||||||
"husky": "^8.0.0",
|
"husky": "^8.0.0",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"identity-obj-proxy": "^3.0.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user