Skip to content

Commit

Permalink
attempt to reproduce #25
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Apr 3, 2021
1 parent 067c19b commit 764e8e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/react/package.json
Expand Up @@ -3,6 +3,7 @@
"start": "npm run dev",
"dev": "ts-node ./server",
"prod": "npm run build && npm run prod:serve",
"prod:server": "cross-env NODE_ENV=production ts-node ./server",
"// Build for production": "",
"build": "npm run build:clean && npm run build:vite && npm run build:prerender",
"build:clean": "rm -rf dist/",
Expand Down
2 changes: 2 additions & 0 deletions examples/react/pages/_default/_default.page.client.tsx
Expand Up @@ -24,6 +24,8 @@ const { hydrationPromise } = useClientRouter({

hydrationPromise.then(() => {
console.log("Hydration finished; page is now interactive.");
// @ts-ignore
console.log(import.meta.env);
});

function onTransitionStart() {
Expand Down
4 changes: 4 additions & 0 deletions examples/react/pages/hello/index.page.server.ts
Expand Up @@ -6,11 +6,15 @@ type ContextProps = {
};

function setPageProps({ contextProps }: { contextProps: ContextProps }) {
// @ts-ignore
console.log(import.meta.env);
const { name } = contextProps;
return { name };
}

function prerender() {
// @ts-ignore
console.log(import.meta.env);
const names = ["evan", "rom", "alice", "jon", "eli"];
const urls = names.map((name) => `/hello/${name}`);
return urls;
Expand Down

0 comments on commit 764e8e5

Please sign in to comment.