Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15d4ef2
commit 2d4c6cc
Showing
6 changed files
with
55 additions
and
38 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,41 @@ | ||
import solid from "solid-start/vite" | ||
import { defineConfig } from "vite" | ||
import devtools from "solid-devtools/vite" | ||
import cloudflare from "solid-start-cloudflare-pages" | ||
|
||
// TODO: ssr: false because with it createResource doesn't log to client | ||
// because callbacks happen on server | ||
// something to fix for later | ||
// ideally the landing page is SSR'd | ||
// with true, the logs are sent to client | ||
export default defineConfig({ | ||
plugins: [ | ||
solid({ ssr: false, adapter: cloudflare({}) }), | ||
devtools({ | ||
/* additional options */ | ||
autoname: true, // e.g. enable autoname | ||
locator: { | ||
targetIDE: "vscode-insiders", | ||
componentLocation: true, | ||
jsxLocation: true, | ||
}, | ||
}), | ||
], | ||
clearScreen: false, | ||
// tauri expects a fixed port, fail if that port is not available | ||
server: { | ||
port: 3000, | ||
strictPort: true, | ||
}, | ||
// to make use of `TAURI_DEBUG` and other env variables | ||
// https://tauri.studio/v1/api/config#buildconfig.beforedevcommand | ||
envPrefix: ["VITE_", "TAURI_"], | ||
build: { | ||
// Tauri supports es2021 | ||
target: process.env.TAURI_PLATFORM == "windows" ? "chrome105" : "safari13", | ||
// don't minify for debug builds | ||
minify: !process.env.TAURI_DEBUG ? "esbuild" : false, | ||
// produce sourcemaps for debug builds | ||
sourcemap: !!process.env.TAURI_DEBUG, | ||
}, | ||
}) |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.