-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix localhost Signed-off-by: Jess Frazelle <[email protected]> * upfates Signed-off-by: Jess Frazelle <[email protected]> * updates Signed-off-by: Jess Frazelle <[email protected]> * fmt Signed-off-by: Jess Frazelle <[email protected]> --------- Signed-off-by: Jess Frazelle <[email protected]>
- Loading branch information
Showing
6 changed files
with
283 additions
and
18 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
import { sveltekit } from '@sveltejs/kit/vite' | ||
import { defineConfig } from 'vitest/config' | ||
import { defineConfig, loadEnv } from 'vite' | ||
import mkcert from 'vite-plugin-mkcert' | ||
|
||
export default defineConfig({ | ||
plugins: [sveltekit()], | ||
server: { | ||
port: 3000, | ||
strictPort: true | ||
}, | ||
preview: { | ||
port: 3000, | ||
strictPort: true | ||
}, | ||
test: { | ||
include: ['src/**/*.{test,spec}.{js,ts}'] | ||
export default defineConfig(({ mode }) => { | ||
// Load env file based on `mode` in the current working directory. | ||
// Set the third parameter to '' to load all env regardless of the `VITE_` prefix. | ||
loadEnv(mode, process.cwd(), '') | ||
|
||
const plugins = [sveltekit()] | ||
if (mode === 'development') { | ||
plugins.push(mkcert()) | ||
} | ||
|
||
return { | ||
plugins, | ||
server: { | ||
port: 3000, | ||
strictPort: true, | ||
https: mode === 'development' | ||
}, | ||
preview: { | ||
port: 3000, | ||
strictPort: true, | ||
https: mode === 'development' | ||
}, | ||
test: { | ||
include: ['src/**/*.{test,spec}.{js,ts}'] | ||
} | ||
} | ||
}) |
Oops, something went wrong.