-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] add methodOverride to default configs (#3411)
* [fix] add methodOverride to default configs * Changeset
- Loading branch information
Showing
7 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'create-svelte': patch | ||
--- | ||
|
||
Add methodOverrides to default configs |
23 changes: 23 additions & 0 deletions
23
packages/create-svelte/shared/+default+typescript/svelte.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
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(), | ||
|
||
kit: { | ||
adapter: adapter(), | ||
|
||
// hydrate the <div id="svelte"> element in src/app.html | ||
target: '#svelte', | ||
|
||
// Override http methods in the Todo forms | ||
methodOverride: { | ||
allowed: ['PATCH', 'DELETE'] | ||
} | ||
} | ||
}; | ||
|
||
export default config; |
18 changes: 18 additions & 0 deletions
18
packages/create-svelte/shared/+default-typescript/svelte.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import adapter from '@sveltejs/adapter-auto'; | ||
|
||
/** @type {import('@sveltejs/kit').Config} */ | ||
const config = { | ||
kit: { | ||
adapter: adapter(), | ||
|
||
// hydrate the <div id="svelte"> element in src/app.html | ||
target: '#svelte', | ||
|
||
// Override http methods in the Todo forms | ||
methodOverride: { | ||
allowed: ['PATCH', 'DELETE'] | ||
} | ||
} | ||
}; | ||
|
||
export default config; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters