diff --git a/packages/adapter-netlify/README.md b/packages/adapter-netlify/README.md index 32b0e857cefed..b7248d1bef4d3 100644 --- a/packages/adapter-netlify/README.md +++ b/packages/adapter-netlify/README.md @@ -32,11 +32,11 @@ Then, make sure you have a [netlify.toml](https://docs.netlify.com/configure-bui ```toml [build] command = "npm run build" - publish = "build/" - functions = "functions/" + publish = ".svelte-kit/netlify/build/" + functions = ".svelte-kit/netlify/functions/" ``` -It's recommended that you add the `build` and `functions` folders (or whichever other folders you specify) to your `.gitignore`. +In this example, we placed the `build` and `functions` folders under `.svelte-kit/netlify`. If you specify another location, you will probably also want to add them to your `.gitignore`. ## Netlify alternatives to SvelteKit functionality diff --git a/packages/adapter-netlify/files/entry.js b/packages/adapter-netlify/files/entry.js index 4ad61b319f55d..4f295867b9e72 100644 --- a/packages/adapter-netlify/files/entry.js +++ b/packages/adapter-netlify/files/entry.js @@ -1,5 +1,5 @@ // TODO hardcoding the relative location makes this brittle -import { init, render } from '../output/server/app.js'; // eslint-disable-line import/no-unresolved +import { init, render } from '../../output/server/app.js'; // eslint-disable-line import/no-unresolved import { isContentTypeTextual } from '@sveltejs/kit/adapter-utils'; // eslint-disable-line import/no-unresolved init(); diff --git a/packages/adapter-netlify/index.js b/packages/adapter-netlify/index.js index 1dfbeaa959132..fa34b879e3834 100644 --- a/packages/adapter-netlify/index.js +++ b/packages/adapter-netlify/index.js @@ -29,11 +29,11 @@ export default function (options) { utils.update_ignores({ patterns: [publish, functions] }); utils.log.minor('Generating serverless function...'); - utils.copy(join(files, 'entry.js'), '.svelte-kit/netlify/entry.js'); + utils.copy(join(files, 'entry.js'), '.svelte-kit/netlify/intermediate/entry.js'); /** @type {BuildOptions} */ const defaultOptions = { - entryPoints: ['.svelte-kit/netlify/entry.js'], + entryPoints: ['.svelte-kit/netlify/intermediate/entry.js'], outfile: join(functions, 'render/index.js'), bundle: true, inject: [join(files, 'shims.js')],