X-Git-Url: https://git.r.bdr.sh/rbdr/forum/blobdiff_plain/bd8e98d7e24c4dbaee7db6ec7955f7c2f6d396a6..47b0bfe47e6f13d549897149b0abc4a72ba8ac88:/svelte.config.cjs?ds=sidebyside diff --git a/svelte.config.cjs b/svelte.config.cjs index cf7a842..cb51cef 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', + adapter: node(), // hydrate the
element in src/app.html - target: '#forum' + target: '#forum', + + vite: { + ssr: { + noExternal: Object.keys(pkg.dependencies || {}) + }, + resolve: { + alias: { + $: resolve('src') + } + } + } } };