Skip to content

Commit

Permalink
feat(adapter): ✨ support adapter-node
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Mar 8, 2022
1 parent 24fba21 commit e09e26c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@iconify-json/heroicons-outline": "^1.1.1",
"@iconify-json/heroicons-solid": "^1.1.1",
"@sveltejs/adapter-auto": "^1.0.0-next.31",
"@sveltejs/adapter-node": "^1.0.0-next.71",
"@sveltejs/adapter-static": "^1.0.0-next.29",
"@sveltejs/kit": "^1.0.0-next.294",
"@tailwindcss/typography": "^0.5.2",
Expand Down
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import preprocess from 'svelte-preprocess'
import adapterAuto from '@sveltejs/adapter-auto'
import adapterNode from '@sveltejs/adapter-node'
import adapterStatic from '@sveltejs/adapter-static'
import { mdsvex } from 'mdsvex'
import { mdsvexConfig } from './mdsvex.config.js'
Expand All @@ -21,7 +22,9 @@ const config = {
kit: {
adapter: Object.keys(process.env).some(key => ['VERCEL', 'CF_PAGES', 'NETLIFY'].includes(key))
? adapterAuto()
: adapterStatic({
: process.env.ADAPTER === 'node'
? adapterNode({ out: 'build' })
: adapterStatic({
pages: 'build',
assets: 'build',
fallback: null
Expand Down

0 comments on commit e09e26c

Please sign in to comment.