Skip to content

Commit 453157b

Browse files
committed
[fix] add methodOverride to default configs
1 parent 3e4f3ba commit 453157b

File tree

6 files changed

+45
-0
lines changed

6 files changed

+45
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import adapter from '@sveltejs/adapter-auto';
2+
import preprocess from 'svelte-preprocess';
3+
4+
/** @type {import('@sveltejs/kit').Config} */
5+
const config = {
6+
// Consult https://github.com/sveltejs/svelte-preprocess
7+
// for more information about preprocessors
8+
preprocess: preprocess(),
9+
10+
kit: {
11+
adapter: adapter(),
12+
13+
// hydrate the <div id="svelte"> element in src/app.html
14+
target: '#svelte',
15+
16+
// Override http methods in the Todo forms
17+
methodOverride: {
18+
allowed: ['PATCH', 'DELETE']
19+
}
20+
}
21+
};
22+
23+
export default config;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import adapter from '@sveltejs/adapter-auto';
2+
3+
/** @type {import('@sveltejs/kit').Config} */
4+
const config = {
5+
kit: {
6+
adapter: adapter(),
7+
8+
// hydrate the <div id="svelte"> element in src/app.html
9+
target: '#svelte',
10+
11+
// Override http methods in the Todo forms
12+
methodOverride: {
13+
allowed: ['PATCH', 'DELETE']
14+
}
15+
}
16+
};
17+
18+
export default config;

packages/create-svelte/templates/default/svelte.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import adapter from '@sveltejs/adapter-auto';
22
import preprocess from 'svelte-preprocess';
33

4+
// This config is ignored and replaced with one of the configs in the shared folder when a project is created.
5+
46
/** @type {import('@sveltejs/kit').Config} */
57
const config = {
68
// Consult https://github.com/sveltejs/svelte-preprocess

packages/create-svelte/templates/skeleton/svelte.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import adapter from '@sveltejs/adapter-auto';
22

3+
// This config is ignored and replaced with one of the configs in the shared folder when a project is created.
4+
35
/** @type {import('@sveltejs/kit').Config} */
46
const config = {
57
kit: {

0 commit comments

Comments
 (0)