create-nextjs-cms 0.5.60 → 0.5.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-nextjs-cms",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.62",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"tsx": "^4.20.6",
|
|
28
28
|
"typescript": "^5.9.2",
|
|
29
29
|
"@lzcms/eslint-config": "0.3.0",
|
|
30
|
-
"@lzcms/
|
|
31
|
-
"@lzcms/
|
|
30
|
+
"@lzcms/tsconfig": "0.1.0",
|
|
31
|
+
"@lzcms/prettier-config": "0.1.0"
|
|
32
32
|
},
|
|
33
33
|
"prettier": "@lzcms/prettier-config",
|
|
34
34
|
"scripts": {
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
// This prevents errors if the auto-generated file is deleted by end-users
|
|
3
|
-
// The file is auto-generated by SectionFactory and can be safely deleted
|
|
4
|
-
// without breaking the application - it will fall back to current timestamp
|
|
1
|
+
let configLastUpdated: number = Date.now()
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
try {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// This ensures the app continues to work even if the file is deleted
|
|
17
|
-
configLastUpdated = Date.now()
|
|
3
|
+
// Use new Function to bypass next.js dynamic import restriction
|
|
4
|
+
const loadHotReloadFile = async () => {
|
|
5
|
+
try {
|
|
6
|
+
// This approach completely bypasses next.js dynamic import restriction
|
|
7
|
+
const importFn = new Function('path', 'return import(path)')
|
|
8
|
+
const sectionInfo = await importFn('./_section-hot-reload.js')
|
|
9
|
+
configLastUpdated = sectionInfo?.configLastUpdated ?? Date.now()
|
|
10
|
+
} catch {
|
|
11
|
+
configLastUpdated = Date.now()
|
|
12
|
+
}
|
|
18
13
|
}
|
|
19
14
|
|
|
15
|
+
loadHotReloadFile()
|
|
16
|
+
|
|
20
17
|
export { configLastUpdated }
|