Skip to content

Commit

Permalink
Fix ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Jan 19, 2022
1 parent cbb354f commit 399b2a3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@cypress/snapshot": "^2.1.7",
"@sveltejs/adapter-static": "1.0.0-next.26",
"@sveltejs/kit": "1.0.0-next.221",
"@sveltejs/kit": "1.0.0-next.232",
"@types/mermaid": "^8.2.7",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
Expand Down
9 changes: 9 additions & 0 deletions src/hooks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { Handle } from '@sveltejs/kit/types/hooks';

export const handle: Handle = async ({ request, resolve }) => {
const response = await resolve(request, {
ssr: false
});

return response;
};
1 change: 0 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const config = {
base: `/mermaid-live-editor${process.env['BETA'] ? '/beta' : ''}`
}
: {},
ssr: false,
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',
trailingSlash: 'ignore',
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@
dependencies:
tiny-glob "^0.2.9"

"@sveltejs/[email protected].221":
version "1.0.0-next.221"
resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-1.0.0-next.221.tgz#12f42217c56297c37eee89ce7b93c4b68f3900d1"
integrity sha512-vKok5MdAjkXeql4pjBAotaO3Yp0oTJJI0SIAB1skZiHnW0Ja2AMFZBFGaNhFLNhG+qP+k4NNn9utMifpvY8NbQ==
"@sveltejs/[email protected].232":
version "1.0.0-next.232"
resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-1.0.0-next.232.tgz#a8879e331d37259d99f72cbcffa00d177106b896"
integrity sha512-STQ0hnJozIop8k9I313nwVasBIQ45Z2K1pUOkDVjCSOGijgsj+De5q0prQBtL1ZlqqisfkYlOf8W9gvDSyTLEA==
dependencies:
"@sveltejs/vite-plugin-svelte" "^1.0.0-next.32"
sade "^1.7.4"
Expand Down

0 comments on commit 399b2a3

Please sign in to comment.