Skip to content

Commit

Permalink
🔧 Align config with scaffold project
Browse files Browse the repository at this point in the history
  • Loading branch information
homostellaris committed Mar 21, 2024
1 parent 48b5380 commit 70167c8
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 15 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
22 changes: 15 additions & 7 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"$lib": ["src/lib"],
"$lib/*": ["src/lib/*"]
}
},
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte", "vite.config.js"]
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}
13 changes: 13 additions & 0 deletions src/app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export {};
4 changes: 2 additions & 2 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
%sveltekit.head%
</head>

<body>
<div id="svelte">%sveltekit.body%</div>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>

</html>
1 change: 0 additions & 1 deletion src/global.d.ts

This file was deleted.

3 changes: 3 additions & 0 deletions svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import adapter from '@sveltejs/adapter-netlify'
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
},
}
Expand Down
8 changes: 3 additions & 5 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import {sveltekit} from '@sveltejs/kit/vite'
import {defineConfig} from 'vite'

/** @type {import('vite').UserConfig} */
const config = {
export default defineConfig({
plugins: [sveltekit()],
}

export default config
})

0 comments on commit 70167c8

Please sign in to comment.