X-Git-Url: https://git.r.bdr.sh/rbdr/forum/blobdiff_plain/bd8e98d7e24c4dbaee7db6ec7955f7c2f6d396a6..5fc4715f923e5a0935cff2030325608ea6ddc0d6:/svelte.config.cjs diff --git a/svelte.config.cjs b/svelte.config.cjs index cf7a842..aa6e765 100644 --- a/svelte.config.cjs +++ b/svelte.config.cjs @@ -1,11 +1,27 @@ +const { resolve } = require('path'); +const Node = require('@sveltejs/adapter-node'); +const Pkg = require('./package.json'); + +/** @type {import('@sveltejs/kit').Config} */ module.exports = { - kit: { - // By default, `npm run build` will create a standard Node app. - // You can create optimized builds for different platforms by - // specifying a different adapter - adapter: '@sveltejs/adapter-node', + kit: { + // By default, `npm run build` will create a standard Node app. + // You can create optimized builds for different platforms by + // specifying a different adapter + adapter: Node(), + + // hydrate the
element in src/app.html + target: '#forum', - // hydrate the
element in src/app.html - target: '#forum' - } + vite: { + ssr: { + noExternal: Object.keys(Pkg.dependencies || {}) + }, + resolve: { + alias: { + $: resolve('src') + } + } + } + } };