Added node adapter to sveltekit compilation

This commit is contained in:
2023-04-06 23:58:39 +02:00
parent 8bb65dfc2e
commit bde055c79a
2 changed files with 15 additions and 9 deletions

View File

@@ -12,6 +12,7 @@
"format": "prettier --plugin-search-dir . --write src" "format": "prettier --plugin-search-dir . --write src"
}, },
"devDependencies": { "devDependencies": {
"@sveltejs/adapter-node": "^1.2.3",
"@sveltejs/adapter-static": "1.0.0", "@sveltejs/adapter-static": "1.0.0",
"@sveltejs/kit": "1.0.1", "@sveltejs/kit": "1.0.1",
"@types/cookie": "0.5.1", "@types/cookie": "0.5.1",

View File

@@ -1,16 +1,21 @@
import adapter from '@sveltejs/adapter-node';
import preprocess from 'svelte-preprocess'; import preprocess from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {
// Consult https://github.com/sveltejs/svelte-preprocess // Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors // for more information about preprocessors
preprocess: preprocess(), preprocess: preprocess(),
kit: { kit: {
csrf: { adapter: adapter({
checkOrigin: false out: 'build',
} preprocess: false
} }),
csrf: {
checkOrigin: false
}
}
}; };
export default config; export default config;