diff --git a/dev/app.config.ts b/dev/app.config.ts index de7f831..9073490 100644 --- a/dev/app.config.ts +++ b/dev/app.config.ts @@ -1,3 +1,78 @@ import { defineConfig } from "@solidjs/start/config"; -export default defineConfig({}); +export default defineConfig({ + /** + * Toggle between client and server rendering. + * @default true + */ + ssr: true, + + /** + * Configuration object for [vite-plugin-solid](https://github.com/solidjs/vite-plugin-solid) + */ + solid: {}, + + /** + * Array of file extensions to be treated as routes. + * @default ["js", "jsx", "ts", "tsx"] + */ + extensions: ["js", "jsx", "ts", "tsx"], + + /** + * Nitro server config options + * + * @see https://nitro.unjs.io/config + */ + server: { + preset: "cloudflare-pages", + esbuild: { + options: { + // We need BigInt support (default: 2019) + target: "esnext", + }, + }, + }, + + /** + * The path to the root of the application. + * + * @default "./src" + */ + appRoot: "./src", + + /** + * The path to where the routes are located. + * + * @default "./routes" + */ + routeDir: "./routes", + + /** + * The path to an optional middleware file. + */ + middleware: undefined, + + /** + * Toggle the dev overlay. + * + * @default true + */ + devOverlay: true, + + experimental: { + /** + * Enable "islands" mode. + */ + islands: false, + }, + + /** + * Vite config object. Can be configured for each router which has + * the string value "server", "client" or "server-function"` + * + * @see https://vitejs.dev/config/shared-options.html + */ + vite: { + plugins: [], + }, +}); diff --git a/dev/wrangler.toml b/dev/wrangler.toml new file mode 100644 index 0000000..5c357e6 --- /dev/null +++ b/dev/wrangler.toml @@ -0,0 +1,8 @@ +# https://developers.cloudflare.com/pages/functions/wrangler-configuration +name = "solid-top-loading-bar" +pages_build_output_dir = "dist" +compatibility_date = "2024-11-17" + +# https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement +[placement] +mode = "smart"