Skip to content

Commit

Permalink
add vercel build config for svelte-kit-demo, make a start on #639
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Mar 25, 2021
1 parent 6820e4f commit 9576137
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion examples/svelte-kit-demo/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
/node_modules
/build
/.svelte
/.svelte
/.vercel_build_output
4 changes: 3 additions & 1 deletion examples/svelte-kit-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
"scripts": {
"dev": "svelte-kit dev",
"build": "svelte-kit build",
"start": "svelte-kit start"
"start": "svelte-kit start",
"build:vercel": "ADAPTER=@sveltejs/adapter-vercel OPTIONS={} npm run build"
},
"devDependencies": {
"@sveltejs/adapter-node": "workspace:*",
"@sveltejs/adapter-static": "workspace:*",
"@sveltejs/adapter-vercel": "workspace:*",
"@sveltejs/kit": "workspace:*",
"svelte": "^3.35.0"
}
Expand Down
5 changes: 3 additions & 2 deletions examples/svelte-kit-demo/svelte.config.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const node = require('@sveltejs/adapter-node');
const adapter = require(process.env.ADAPTER || '@sveltejs/adapter-node');
const options = JSON.stringify(process.env.OPTIONS || '{}');

module.exports = {
kit: {
adapter: node(),
adapter: adapter(options),
target: '#svelte'
}
};
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

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

1 comment on commit 9576137

@vercel
Copy link

@vercel vercel bot commented on 9576137 Mar 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.