Use adapter-auto and cleanup
This commit is contained in:
@@ -10,8 +10,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "svelte-kit dev",
|
"dev": "svelte-kit dev",
|
||||||
"build": "svelte-kit build",
|
"build": "svelte-kit build",
|
||||||
"build:vercel": "ADAPTER=@sveltejs/adapter-vercel OPTIONS={} npm run build",
|
|
||||||
"build:cf": "ADAPTER=@sveltejs/adapter-cloudflare OPTIONS={} npm run build",
|
|
||||||
"preview": "svelte-kit preview",
|
"preview": "svelte-kit preview",
|
||||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||||
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
|
|||||||
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@@ -1814,8 +1814,8 @@ packages:
|
|||||||
estree-walker: 0.6.1
|
estree-walker: 0.6.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/rollup/2.75.3:
|
/rollup/2.75.4:
|
||||||
resolution: {integrity: sha512-YA29fLU6MAYSaDxIQYrGGOcbXlDmG96h0krGGYObroezcQ0KgEPM3+7MtKD/qeuUbFuAJXvKZee5dA1dpwq1PQ==}
|
resolution: {integrity: sha512-JgZiJMJkKImMZJ8ZY1zU80Z2bA/TvrL/7D9qcBCrfl2bP+HUaIw0QHUroB4E3gBpFl6CRFM1YxGbuYGtdAswbQ==}
|
||||||
engines: {node: '>=10.0.0'}
|
engines: {node: '>=10.0.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
@@ -2228,7 +2228,7 @@ packages:
|
|||||||
esbuild: 0.14.42
|
esbuild: 0.14.42
|
||||||
postcss: 8.4.14
|
postcss: 8.4.14
|
||||||
resolve: 1.22.0
|
resolve: 1.22.0
|
||||||
rollup: 2.75.3
|
rollup: 2.75.4
|
||||||
sass: 1.52.1
|
sass: 1.52.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
fsevents: 2.3.2
|
fsevents: 2.3.2
|
||||||
@@ -2256,7 +2256,7 @@ packages:
|
|||||||
/wide-align/1.1.5:
|
/wide-align/1.1.5:
|
||||||
resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==}
|
resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
string-width: 4.2.3
|
string-width: 1.0.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/word-wrap/1.2.3:
|
/word-wrap/1.2.3:
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import preprocess from 'svelte-preprocess'
|
import preprocess from 'svelte-preprocess'
|
||||||
|
import adapter from '@sveltejs/adapter-auto'
|
||||||
const adapter = process.env.ADAPTER || '@sveltejs/adapter-node'
|
|
||||||
const options = JSON.parse(process.env.OPTIONS || '{}')
|
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
@@ -9,6 +7,7 @@ const config = {
|
|||||||
preprocess: preprocess(),
|
preprocess: preprocess(),
|
||||||
|
|
||||||
kit: {
|
kit: {
|
||||||
|
adapter: adapter(),
|
||||||
alias: {
|
alias: {
|
||||||
$components: 'src/components',
|
$components: 'src/components',
|
||||||
$animations: 'src/animations',
|
$animations: 'src/animations',
|
||||||
@@ -18,8 +17,4 @@ const config = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (adapter) {
|
|
||||||
config.kit.adapter = (await import(adapter)).default(options)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
export default config
|
||||||
Reference in New Issue
Block a user