Add patch for inflexible sveltejs-kit
This commit is contained in:
parent
6740030a0c
commit
e14e85425e
@ -9,7 +9,8 @@
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "prettier --check . && eslint .",
|
||||
"format": "prettier --write ."
|
||||
"format": "prettier --write .",
|
||||
"postinstall": "patch-package"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-json": "^6.0.1",
|
||||
@ -37,6 +38,7 @@
|
||||
"@fontsource/oswald": "^5.0.17",
|
||||
"@fontsource/ubuntu": "^5.0.8",
|
||||
"bootstrap": "^5.3.2",
|
||||
"patch-package": "^8.0.0",
|
||||
"svelte-i18n": "^4.0.0",
|
||||
"sveltestrap": "^5.11.2",
|
||||
"swagger-ui": "^5.10.0"
|
||||
|
17
patches/@sveltejs+kit+1.27.6.patch
Normal file
17
patches/@sveltejs+kit+1.27.6.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/node_modules/@sveltejs/kit/src/exports/vite/index.js b/node_modules/@sveltejs/kit/src/exports/vite/index.js
|
||||
index a7a886d..d3433b5 100644
|
||||
--- a/node_modules/@sveltejs/kit/src/exports/vite/index.js
|
||||
+++ b/node_modules/@sveltejs/kit/src/exports/vite/index.js
|
||||
@@ -561,9 +561,9 @@ function kit({ svelte_config }) {
|
||||
input,
|
||||
output: {
|
||||
format: 'esm',
|
||||
- entryFileNames: ssr ? '[name].js' : `${prefix}/[name].[hash].${ext}`,
|
||||
- chunkFileNames: ssr ? 'chunks/[name].js' : `${prefix}/chunks/[name].[hash].${ext}`,
|
||||
- assetFileNames: `${prefix}/assets/[name].[hash][extname]`,
|
||||
+ entryFileNames: ssr ? '[name].js' : `${prefix}/[hash].${ext}`,
|
||||
+ chunkFileNames: ssr ? 'chunks/[name].js' : `${prefix}/chunks/[hash].${ext}`,
|
||||
+ assetFileNames: `${prefix}/assets/[hash][extname]`,
|
||||
hoistTransitiveImports: false,
|
||||
sourcemapIgnoreList
|
||||
},
|
@ -15,6 +15,7 @@
|
||||
import { locale, locales, waitLocale } from 'svelte-i18n';
|
||||
import type { LayoutLoad } from './$types';
|
||||
import { browser } from '$app/environment';
|
||||
import { page } from '$app/stores';
|
||||
|
||||
export const setLocale = (lang: string) => () => {
|
||||
locale.set(lang);
|
||||
@ -27,10 +28,10 @@
|
||||
<Collapse navbar expand="md">
|
||||
<Nav class="me-auto" navbar>
|
||||
<NavItem>
|
||||
<NavLink href="/">Home</NavLink>
|
||||
<NavLink href="/" active="{$page.url.pathname === ("/")}">Home</NavLink>
|
||||
</NavItem>
|
||||
<NavItem>
|
||||
<NavLink href="/api">API</NavLink>
|
||||
<NavLink href="/api" active="{$page.url.pathname === ("/api")}">API</NavLink>
|
||||
</NavItem>
|
||||
</Nav>
|
||||
<Dropdown inNavbar>
|
||||
|
@ -34,6 +34,10 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>₿TClock</title>
|
||||
</svelte:head>
|
||||
|
||||
<Container fluid>
|
||||
<Row>
|
||||
<Control bind:settings></Control>
|
||||
|
@ -4,21 +4,48 @@
|
||||
|
||||
import { onMount } from 'svelte';
|
||||
import * as swaggerJson from './swagger.json';
|
||||
//import SwaggerUI from 'swagger-ui';
|
||||
//import 'swagger-ui/dist/swagger-ui.css';
|
||||
// import SwaggerUI from 'swagger-ui';
|
||||
import 'swagger-ui/dist/swagger-ui.css';
|
||||
|
||||
onMount(async () => {
|
||||
// SwaggerUI({
|
||||
// spec: swaggerJson,
|
||||
// dom_id: '#swagger-ui-container'
|
||||
// });
|
||||
// @ts-ignore
|
||||
SwaggerUIBundle({
|
||||
spec: swaggerJson,
|
||||
dom_id: '#swagger-ui-container',
|
||||
presets: [
|
||||
// @ts-ignore
|
||||
SwaggerUIBundle.presets.apis,
|
||||
// @ts-ignore
|
||||
SwaggerUIStandalonePreset
|
||||
],
|
||||
// layout: "StandaloneLayout",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>API playground</title>
|
||||
<title>API playground</title>
|
||||
<script
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.10.0/swagger-ui-bundle.min.js"
|
||||
integrity="sha512-Ckle4LZv9LhAfEdohBdUi+QCu0e7HkXHTeSPXfbDzbCsR87QNTUBylkBEPsBNn4Ph83yK1hJ6f2uH4QMtB0hTA=="
|
||||
crossorigin="anonymous"
|
||||
referrerpolicy="no-referrer"
|
||||
></script>
|
||||
<script
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.10.0/swagger-ui-standalone-preset.min.js"
|
||||
integrity="sha512-qwGi7EG31HcylzamsmacHLZJrfUGRuuHEaCMcOojuNpMu+paR554VjaCZ9LdUVTrmF8xC03YVqTzuKx0SDdruA=="
|
||||
crossorigin="anonymous"
|
||||
referrerpolicy="no-referrer"
|
||||
></script>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.10.0/swagger-ui.min.css"
|
||||
integrity="sha512-Ck+X9SARG7WscOTG4a8Qod5Zgd1MZlz4VtyyucjMJ3PnZy2lUl7q/v/0055yIfGM/v+f+216ME0/dv0qqtm6+g=="
|
||||
crossorigin="anonymous"
|
||||
referrerpolicy="no-referrer"
|
||||
/>
|
||||
</svelte:head>
|
||||
|
||||
<Container fluid>
|
||||
<div id="swagger-ui-container" />
|
||||
<div id="swagger-ui-container" />
|
||||
</Container>
|
||||
|
Loading…
Reference in New Issue
Block a user