From 49be445d69304ee97b27db78ff9c81f40a75d5f8 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 13 Oct 2022 12:10:55 -0700 Subject: [PATCH 1/2] chore: removed netlify.toml --- netlify.toml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 37a84f6..0000000 --- a/netlify.toml +++ /dev/null @@ -1,25 +0,0 @@ -# example netlify.toml -[build] - command = "npm run build" - functions = "netlify/functions" - publish = "dist" - -[dev] - framework = "svelte-kit" - targetPort = 5173 - - ## Uncomment to use this redirect for Single Page Applications like create-react-app. - ## Not needed for static site generators. - #[[redirects]] - # from = "/*" - # to = "/index.html" - # status = 200 - - ## (optional) Settings for Netlify Dev - ## https://github.com/netlify/cli/blob/main/docs/netlify-dev.md#project-detection - #[dev] - # command = "yarn start" # Command to start your dev server - # port = 3000 # Port that the dev server will be listening on - # publish = "dist" # Folder with the static content for _redirect file - - ## more info on configuring this file: https://docs.netlify.com/configure-builds/file-based-configuration/ From 30ee339eff01c1ace899a52baaeb3ed3dd2e6c72 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 13 Oct 2022 20:53:02 -0700 Subject: [PATCH 2/2] chore: modified svelte.config.js and netlify.toml formatting; added build/ to gitignore --- .gitignore | 5 ++--- netlify.toml | 3 +++ svelte.config.js | 24 +++++++++++++----------- 3 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 netlify.toml diff --git a/.gitignore b/.gitignore index d3d1fd5..569c92b 100644 --- a/.gitignore +++ b/.gitignore @@ -34,9 +34,6 @@ bower_components # node-waf configuration .lock-wscript -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - # Dependency directories node_modules/ jspm_packages/ @@ -117,4 +114,6 @@ dist *.sln *.sw? +# SvelteKit build artifacts +build/ .svelte-kit/ \ No newline at end of file diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..a1680b2 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,3 @@ +[build] + command = "npm run build" + publish = "dist" diff --git a/svelte.config.js b/svelte.config.js index 892f0c4..70724a3 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,15 +1,17 @@ -import adapter from '@sveltejs/adapter-auto'; -import preprocess from 'svelte-preprocess'; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - // Consult https://github.com/sveltejs/svelte-preprocess - // for more information about preprocessors - preprocess: preprocess(), +import adapter from '@sveltejs/adapter-netlify'; +export default { kit: { - adapter: adapter() + // default options are shown + adapter: adapter({ + // if true, will create a Netlify Edge Function rather + // than using standard Node-based functions + edge: true, + + // if true, will split your app into multiple functions + // instead of creating a single one for the entire app. + // if `edge` is true, this option cannot be used + split: false + }) } }; - -export default config;