Skip to content

Commit

Permalink
fix: use ahead of time compile
Browse files Browse the repository at this point in the history
  • Loading branch information
linhub15 committed Oct 22, 2024
1 parent ba1158c commit 22d8e13
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
5 changes: 2 additions & 3 deletions dev.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env -S deno run -A --watch=static/,routes/

import dev from "$fresh/dev.ts";
import config from "./fresh.config.ts";

await dev(import.meta.url, "./main.ts");
await dev(import.meta.url, "./main.ts", config);
10 changes: 10 additions & 0 deletions fresh.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from "$fresh/server.ts";
import tailwind from "$fresh/plugins/tailwind.ts";
import googleAnalyticsPlugin from "./plugins/google_analytics.ts";

export default defineConfig({
plugins: [
tailwind(),
googleAnalyticsPlugin("G-LG7XQ7H5RG"),
],
});
17 changes: 2 additions & 15 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/// <reference no-default-lib="true" />
/// <reference lib="dom" />
/// <reference lib="dom.iterable" />
/// <reference lib="dom.asynciterable" />
/// <reference lib="deno.ns" />

import { start } from "$fresh/server.ts";
import manifest from "./fresh.gen.ts";
import config from "./fresh.config.ts";

import tailwind from "$fresh/plugins/tailwind.ts";
import googleAnalyticsPlugin from "./plugins/google_analytics.ts";

await start(manifest, {
plugins: [
tailwind(),
googleAnalyticsPlugin("G-LG7XQ7H5RG"),
],
});
await start(manifest, config);

0 comments on commit 22d8e13

Please sign in to comment.