Skip to content

Commit

Permalink
reproduce bug
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Feb 27, 2024
1 parent 3ec67a8 commit 5e8218f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/01_template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"type": "module",
"private": true,
"scripts": {
"dev": "waku dev --with-ssr",
"build": "waku build --with-ssr",
"start": "waku start --with-ssr"
"dev": "DONT_LEAK_IN_BUILD_TIME=YES waku dev",
"build": "DONT_LEAK_IN_BUILD_TIME=NO waku build",
"start": "DONT_LEAK_IN_BUILD_TIME=YES waku start"
},
"dependencies": {
"react": "18.3.0-canary-6c3b8dbfe-20240226",
Expand Down
5 changes: 3 additions & 2 deletions examples/01_template/src/entries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createPages } from 'waku';
import { RootLayout } from './templates/root-layout.js';
import { HomePage } from './templates/home-page.js';
import { AboutPage } from './templates/about-page.js';
import { ContactPage } from './templates/contact-page.js';

export default createPages(async ({ createPage, createLayout }) => {
createLayout({
Expand All @@ -12,9 +13,9 @@ export default createPages(async ({ createPage, createLayout }) => {
});

createPage({
render: 'static',
render: 'dynamic',
path: '/',
component: HomePage,
component: ContactPage,
});

createPage({
Expand Down
13 changes: 13 additions & 0 deletions examples/01_template/src/templates/contact-page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { getEnv } from 'waku/server';

export const ContactPage = () => {
const pwd = getEnv('DONT_LEAK_IN_BUILD_TIME')
if (pwd === "NO") {
throw new Error('SHOULD NOT LEAK')
}
return (
<div>
This is contact page, password {pwd}
</div>
)
}

0 comments on commit 5e8218f

Please sign in to comment.