@lolyjs/core 0.2.0-alpha.30 → 0.2.0-alpha.31
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/README.md +6 -7
- package/dist/cli.cjs +359 -171
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +359 -171
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +363 -171
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +361 -171
- package/dist/index.js.map +1 -1
- package/dist/{index.types-B9j4OQft.d.mts → index.types-JJ0KjvFU.d.mts} +58 -14
- package/dist/{index.types-B9j4OQft.d.ts → index.types-JJ0KjvFU.d.ts} +58 -14
- package/dist/react/cache.d.mts +1 -1
- package/dist/react/cache.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1087,15 +1087,14 @@ export const getServerSideProps: ServerLoader = async (ctx) => {
|
|
|
1087
1087
|
const data = await fetchData();
|
|
1088
1088
|
|
|
1089
1089
|
// Redirect
|
|
1090
|
-
|
|
1091
|
-
redirect
|
|
1092
|
-
|
|
1093
|
-
permanent: true,
|
|
1094
|
-
},
|
|
1095
|
-
};
|
|
1090
|
+
if (someCondition) {
|
|
1091
|
+
return ctx.Redirect("/new-path", true); // permanent redirect
|
|
1092
|
+
}
|
|
1096
1093
|
|
|
1097
1094
|
// Not found
|
|
1098
|
-
|
|
1095
|
+
if (!data) {
|
|
1096
|
+
return ctx.NotFound();
|
|
1097
|
+
}
|
|
1099
1098
|
|
|
1100
1099
|
// Return props
|
|
1101
1100
|
return {
|