We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df9a054 commit 7e74df0Copy full SHA for 7e74df0
svelte.config.js
@@ -1,6 +1,16 @@
1
import adapter from '@sveltejs/adapter-node';
2
import preprocess from 'svelte-preprocess';
3
4
+const myPlugin = {
5
+ name: 'log-request-middleware',
6
+ configureServer(server) {
7
+ server.middlewares.use((req, res, next) => {
8
+ console.log(`Got request ${req.url}`);
9
+ next();
10
+ });
11
+ }
12
+};
13
+
14
/** @type {import('@sveltejs/kit').Config} */
15
const config = {
16
// Consult https://github.com/sveltejs/svelte-preprocess
@@ -9,7 +19,10 @@ const config = {
19
20
kit: {
21
adapter: adapter(),
- trailingSlash: 'always'
22
+ trailingSlash: 'always',
23
+ vite: {
24
+ plugins: [myPlugin]
25
26
}
27
};
28
0 commit comments