ci/woodpecker/pr/cli Pipeline was successful
ci/woodpecker/pr/core Pipeline was successful
ci/woodpecker/pr/lsp Pipeline was successful
ci/woodpecker/pr/web-config Pipeline was successful
ci/woodpecker/pr/web-db Pipeline was successful
ci/woodpecker/pr/web-jobs Pipeline was successful
ci/woodpecker/pr/web-lsp Pipeline was successful
ci/woodpecker/pr/web-pieces Pipeline was successful
ci/woodpecker/pr/web-theme Pipeline was successful
ci/woodpecker/pr/web-worker Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
32 lines
981 B
JavaScript
32 lines
981 B
JavaScript
import adapter from '@sveltejs/adapter-node'
|
|
import { defineConfig } from 'vite'
|
|
import { sveltekit } from '@sveltejs/kit/vite'
|
|
import { fileURLToPath } from 'node:url'
|
|
import Icons from 'unplugin-icons/vite'
|
|
|
|
const appLibrary = fileURLToPath(new URL('../../../src/lib/', import.meta.url))
|
|
|
|
export default defineConfig({
|
|
resolve: { alias: { '#lib': appLibrary } },
|
|
plugins: [
|
|
sveltekit({
|
|
compilerOptions: { experimental: { async: true } },
|
|
adapter: adapter({ out: process.env.TEMPLATE_BUILD_DIR }),
|
|
outDir: process.env.TEMPLATE_KIT_DIR,
|
|
csp: {
|
|
mode: 'auto',
|
|
directives: {
|
|
'default-src': ['self'],
|
|
'script-src': ['self'],
|
|
'style-src': ['self', 'unsafe-inline'],
|
|
'object-src': ['none']
|
|
}
|
|
}
|
|
}),
|
|
Icons({ compiler: 'svelte' })
|
|
],
|
|
// Preserve Node integrations and package-relative computed theme imports at runtime.
|
|
ssr: { external: ['@luzzle/core', '@luzzle/web.theme/editor'], noExternal: ['bits-ui'] },
|
|
logLevel: 'error'
|
|
})
|