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.60",
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/prettier-config": "0.1.0",
31
- "@lzcms/tsconfig": "0.1.0"
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
- // Safe import wrapper for configLastUpdated
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
- let configLastUpdated: number
7
-
8
- try {
9
- // Try to import the auto-generated file from root
10
- // Using dynamic require to handle missing file gracefully
11
- // @/ alias resolves to the app root directory
12
- const sectionInfo = require('./_section-hot-reload.js')
13
- configLastUpdated = sectionInfo?.configLastUpdated ?? Date.now()
14
- } catch {
15
- // If file doesn't exist or can't be loaded, use current timestamp as fallback
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 }
@@ -11,7 +11,6 @@ const nextConfig: NextConfig = {
11
11
  '@esbuild/darwin-x64',
12
12
  '@esbuild/darwin-arm64',
13
13
  ],
14
- // THIS WILL FIX THE ISSUE WITH TURBOPACK AND ESBUILD
15
14
  turbopack: {
16
15
  rules: {
17
16
  'esbuild.exe': {
@@ -64,7 +64,7 @@
64
64
  "nanoid": "^5.1.2",
65
65
  "next": "16.1.1",
66
66
  "next-themes": "^0.4.6",
67
- "nextjs-cms": "0.5.60",
67
+ "nextjs-cms": "0.5.62",
68
68
  "plaiceholder": "^3.0.0",
69
69
  "prettier-plugin-tailwindcss": "^0.7.2",
70
70
  "qrcode": "^1.5.4",