Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking: no index html #289

Merged
merged 36 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
21348e4
wip: 01 counter without ssr
dai-shi Dec 17, 2023
caa13e2
Merge branch 'main' into breaking/no-index-html
dai-shi Dec 18, 2023
df4e41f
wip: prd 01 counter without ssr
dai-shi Dec 18, 2023
76e3c7b
a fix
dai-shi Dec 18, 2023
ae510c5
wip: dev 01 counter with ssr
dai-shi Dec 18, 2023
d46d739
remove unused
dai-shi Dec 18, 2023
ac704e3
hack only in DEV
dai-shi Dec 18, 2023
2e4e2e7
wip: prd 01 counter with ssr
dai-shi Dec 18, 2023
0f97e55
remove unused config
dai-shi Dec 18, 2023
b5717b2
example 02
dai-shi Dec 18, 2023
8c3264e
example 03
dai-shi Dec 18, 2023
e43222e
example 04
dai-shi Dec 18, 2023
dc4dd04
example 05
dai-shi Dec 18, 2023
15a8069
example 06
dai-shi Dec 18, 2023
29a2b7d
wip: example 07
dai-shi Dec 18, 2023
df04301
fix embedding prefetch code
dai-shi Dec 18, 2023
204ce44
example 08
dai-shi Dec 18, 2023
e0b6f2a
example 09
dai-shi Dec 18, 2023
74c4a45
example 10
dai-shi Dec 18, 2023
2cd1a7c
example 11 and fix hmr
dai-shi Dec 18, 2023
58ffb7d
example 12 and fix hmr
dai-shi Dec 18, 2023
e4076ac
update website
dai-shi Dec 18, 2023
f4bab22
update fixtures
dai-shi Dec 18, 2023
5e1502e
update CHANGELOG
dai-shi Dec 18, 2023
cb17af5
website: a hack for layout assets
dai-shi Dec 19, 2023
234acf5
Merge branch 'main' into breaking/no-index-html
dai-shi Dec 19, 2023
52e7095
fix tests
dai-shi Dec 19, 2023
d95f5a9
increase timeout for CI
dai-shi Dec 19, 2023
fb5d3a0
remove unnecessary init
dai-shi Dec 19, 2023
c7e6b95
use expect.poll instead
dai-shi Dec 19, 2023
ad2e10a
a hack to supress a warning
dai-shi Dec 19, 2023
5a09af2
trial: specify optimizeDeps
dai-shi Dec 19, 2023
c985fd2
fix format
dai-shi Dec 19, 2023
de92f69
trial force reloading
dai-shi Dec 19, 2023
045512f
Revert "trial force reloading"
dai-shi Dec 19, 2023
f48130f
add vite config for 11_form
dai-shi Dec 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Change Log

## [Unreleased]
### Added
- breaking: no index html #289

## [0.18.1] - 2023-12-15
### Changed
Expand Down
8 changes: 4 additions & 4 deletions e2e/examples-smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ for (const cwd of examples) {

test('check title', async ({ page }) => {
await page.goto(`http://localhost:${port}/`);
const title = await page.title();
expect(title).toBe('Waku example');
// title maybe doesn't ready yet
await page.waitForLoadState('load');
await expect.poll(() => page.title()).toBe('Waku example');
});
});
}
Expand Down Expand Up @@ -173,8 +174,7 @@ for (const cwd of examples) {
await page.goto(`http://localhost:${port}/`);
// title maybe doesn't ready yet
await page.waitForLoadState('load');
const title = await page.title();
expect(title).toBe('Waku example');
await expect.poll(() => page.title()).toBe('Waku example');
});
});
}
Expand Down
37 changes: 0 additions & 37 deletions e2e/fixtures/rsc-basic/index.html

This file was deleted.

1 change: 1 addition & 0 deletions e2e/fixtures/rsc-basic/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ServerBox } from './Box.js';
const App = ({ name }: { name: string }) => {
return (
<ServerBox>
<title>Waku example</title>
<p data-testid="app-name">{name}</p>
<ClientCounter />
<ServerPing />
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/rsc-basic/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const rootElement = (
</StrictMode>
);

createRoot(document.getElementById('root')!).render(rootElement);
createRoot(document.body).render(rootElement);
37 changes: 0 additions & 37 deletions e2e/fixtures/rsc-router/index.html

This file was deleted.

2 changes: 1 addition & 1 deletion e2e/fixtures/rsc-router/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const rootElement = (
</StrictMode>
);

createRoot(document.getElementById('root')!).render(rootElement);
createRoot(document.body).render(rootElement);
1 change: 1 addition & 0 deletions e2e/fixtures/rsc-router/src/routes/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const Pending = ({ isPending }: { isPending: boolean }) => (

const HomeLayout = ({ children }: { children: ReactNode }) => (
<div>
<title>Waku example</title>
<ul>
<li>
<Link
Expand Down
37 changes: 0 additions & 37 deletions e2e/fixtures/ssr-basic/index.html

This file was deleted.

1 change: 1 addition & 0 deletions e2e/fixtures/ssr-basic/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Counter } from './Counter.js';
const App = ({ name }: { name: string }) => {
return (
<div style={{ border: '3px red dashed', margin: '1em', padding: '1em' }}>
<title>Waku example</title>
<h1 data-testid="app-name">{name}</h1>
<Counter />
</div>
Expand Down
4 changes: 2 additions & 2 deletions e2e/fixtures/ssr-basic/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const rootElement = (
);

if ((globalThis as any).__WAKU_SSR_ENABLED__) {
hydrateRoot(document.getElementById('root')!, rootElement);
hydrateRoot(document.body, rootElement);
} else {
createRoot(document.getElementById('root')!).render(rootElement);
createRoot(document.body).render(rootElement);
}
37 changes: 0 additions & 37 deletions examples/01_counter/index.html

This file was deleted.

1 change: 1 addition & 0 deletions examples/01_counter/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Counter } from './Counter.js';
const App = ({ name }: { name: string }) => {
return (
<div style={{ border: '3px red dashed', margin: '1em', padding: '1em' }}>
<title>Waku example</title>
<h1>Hello {name}!!</h1>
<h3>This is a server component.</h3>
<Counter />
Expand Down
4 changes: 2 additions & 2 deletions examples/01_counter/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const rootElement = (
);

if ((globalThis as any).__WAKU_SSR_ENABLED__) {
hydrateRoot(document.getElementById('root')!, rootElement);
hydrateRoot(document.body, rootElement);
} else {
createRoot(document.getElementById('root')!).render(rootElement);
createRoot(document.body).render(rootElement);
}
37 changes: 0 additions & 37 deletions examples/02_async/index.html

This file was deleted.

1 change: 1 addition & 0 deletions examples/02_async/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Counter } from './Counter.js';
const App = ({ name }: { name: string }) => {
return (
<div style={{ border: '3px red dashed', margin: '1em', padding: '1em' }}>
<title>Waku example</title>
<h1>Hello {name}!!</h1>
<h3>This is a server component.</h3>
<Suspense fallback="Pending...">
Expand Down
4 changes: 2 additions & 2 deletions examples/02_async/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const rootElement = (
);

if ((globalThis as any).__WAKU_SSR_ENABLED__) {
hydrateRoot(document.getElementById('root')!, rootElement);
hydrateRoot(document.body, rootElement);
} else {
createRoot(document.getElementById('root')!).render(rootElement);
createRoot(document.body).render(rootElement);
}
37 changes: 0 additions & 37 deletions examples/03_promise/index.html

This file was deleted.

1 change: 1 addition & 0 deletions examples/03_promise/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const App = ({ name, children }: { name: string; children: ReactNode }) => {
});
return (
<div style={{ border: '3px red dashed', margin: '1em', padding: '1em' }}>
<title>Waku example</title>
<h1>Hello {name}!!</h1>
<h3>This is a server component.</h3>
<Counter delayedMessage={delayedMessage} />
Expand Down
4 changes: 2 additions & 2 deletions examples/03_promise/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const rootElement = (
);

if ((globalThis as any).__WAKU_SSR_ENABLED__) {
hydrateRoot(document.getElementById('root')!, rootElement);
hydrateRoot(document.body, rootElement);
} else {
createRoot(document.getElementById('root')!).render(rootElement);
createRoot(document.body).render(rootElement);
}
37 changes: 0 additions & 37 deletions examples/04_callserver/index.html

This file was deleted.

Loading
Loading