Skip to content

Commit ca6fba1

Browse files
committed
chore: plugin-basic-ssl
1 parent 0bb4e8a commit ca6fba1

File tree

4 files changed

+25
-38
lines changed

4 files changed

+25
-38
lines changed

apps/website/src/entry.ssr.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ import Root from './root';
1616

1717
export default function (opts: RenderToStreamOptions) {
1818
return renderToStream(<Root />, {
19+
preloader: {
20+
ssrPreloads: 20,
21+
maxIdlePreloads: 25,
22+
},
1923
manifest,
2024
...opts,
2125
// Use container attributes to set attributes on the html tag.

apps/website/vite.config.ts

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,6 @@ export default defineConfig(async () => {
99
const { default: rehypePrettyCode } = await import('rehype-pretty-code');
1010
const { visit } = await import('unist-util-visit');
1111

12-
// commented out as doesn't seem to work with import.meta.glob eager:false in preview
13-
// let output: any = {};
14-
// if (!isDev) {
15-
// // Client-specific configuration
16-
// output = {
17-
// // Customize the client build structure
18-
// entryFileNames: ({ name }: any) => {
19-
// if (name.startsWith('entry')) {
20-
// return '[name].mjs';
21-
// }
22-
// return `[name]-[hash].js`;
23-
// },
24-
// chunkFileNames: () => {
25-
// return `[name]-[hash].js`;
26-
// },
27-
// assetFileNames: `build/[name]-[hash].[ext]`,
28-
// };
29-
// }
30-
3112
return {
3213
plugins: [
3314
autoAPI(),
@@ -87,6 +68,8 @@ export default defineConfig(async () => {
8768
},
8869
}),
8970
tsconfigPaths({ root: '../../' }),
71+
// Uncomment for debugging preview with http2 via https
72+
// basicSsl(),
9073
],
9174

9275
server: {
@@ -100,11 +83,11 @@ export default defineConfig(async () => {
10083
rollupOptions: {
10184
output: {
10285
manualChunks: (id: string) => {
103-
if (id.includes('node-modules') && id.includes('css-tree')) {
86+
if (id.includes('node_modules') && id.includes('css-tree')) {
10487
return 'css-tree';
10588
}
10689
if (
107-
id.includes('node-modules') &&
90+
id.includes('node_modules') &&
10891
(id.includes('tailwind-merge') || id.includes('clsx'))
10992
) {
11093
return 'cn';

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"@types/node": "20.12.12",
8282
"@typescript-eslint/eslint-plugin": "7.9.0",
8383
"@typescript-eslint/parser": "7.9.0",
84+
"@vitejs/plugin-basic-ssl": "2.0.0",
8485
"@vitest/coverage-v8": "^1.6.0",
8586
"@vitest/ui": "^1.6.0",
8687
"ansis": "3.2.0",

pnpm-lock.yaml

Lines changed: 16 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)