oc-template-preact-compiler 3.1.2 → 3.1.3
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": "oc-template-preact-compiler",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"description": "Compiler for the Preact OC template",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@preact/preset-vite": "^2.7.0",
|
|
32
32
|
"oc-template-preact": "^0.1.1",
|
|
33
|
-
"oc-vite-compiler": "^5.1.
|
|
33
|
+
"oc-vite-compiler": "^5.1.3",
|
|
34
34
|
"preact": "^10"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@testing-library/react": "^14.0.0",
|
|
27
27
|
"@testing-library/user-event": "^14.4.3",
|
|
28
28
|
"jsdom": "^21.1.1",
|
|
29
|
-
"oc-server": "^3.1
|
|
30
|
-
"oc-template-preact-compiler": "^3.1.
|
|
29
|
+
"oc-server": "^3.2.1",
|
|
30
|
+
"oc-template-preact-compiler": "^3.1.3",
|
|
31
31
|
"preact": "^10.13.2",
|
|
32
32
|
"typescript": "5.0.2",
|
|
33
33
|
"vitest": "^0.29.7"
|
|
@@ -53,7 +53,10 @@ export const server = new Server({
|
|
|
53
53
|
|
|
54
54
|
// Set cache headers when same params produce same result
|
|
55
55
|
// This improves performance by reducing server load
|
|
56
|
-
|
|
56
|
+
// Don't cache in local environment because we might get render mismatches
|
|
57
|
+
if (ctx.env.name !== 'local') {
|
|
58
|
+
ctx.setHeader('Cache-Control', 'max-age=300'); // Cache for 5 minutes
|
|
59
|
+
}
|
|
57
60
|
|
|
58
61
|
// Return data that will be passed as props to React component
|
|
59
62
|
return {
|