fix node adapter

This commit is contained in:
2026-10-10 20:33:08 -04:00
parent ed7e82adc2
commit e485b9782b
3 changed files with 4 additions and 22 deletions
+1 -3
View File
@@ -6,7 +6,6 @@ import svelte from 'eslint-plugin-svelte';
import { defineConfig } from 'eslint/config';
import globals from 'globals';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
@@ -33,8 +32,7 @@ export default defineConfig(
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
parser: ts.parser
}
}
}
-18
View File
@@ -1,18 +0,0 @@
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter()
}
};
export default config;
+3 -1
View File
@@ -1,5 +1,7 @@
import tailwindcss from '@tailwindcss/vite';
import { sveltekit } from '@sveltejs/kit/vite';
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { defineConfig } from 'vite';
import { readFileSync } from 'fs';
import { fileURLToPath } from 'url';
@@ -14,7 +16,7 @@ const allowedHosts = process.env.VITE_ALLOWED_HOSTS
: ['localhost'];
export default defineConfig({
plugins: [tailwindcss(), sveltekit()],
plugins: [tailwindcss(), sveltekit({ adapter: adapter(), preprocess: vitePreprocess() })],
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
COMMIT_HASH: JSON.stringify(process.env.GIT_COMMIT_HASH || 'unknown')