Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions packages/plugin-vite/src/mod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/**
* @module
*
* The official Vite plugin for the
* [Fresh](https://usefresh.dev) web framework for Deno.
*
* This plugin uses Vite's Environment API to provide dual
* client/server builds, HMR, island-based code splitting,
* and Deno-native module resolution for Fresh applications.
*
* @example vite.config.ts
* ```ts
* import { defineConfig } from "vite";
* import { fresh } from "@fresh/plugin-vite";
*
* export default defineConfig({
* plugins: [fresh()],
* });
* ```
*/

import type { Plugin } from "vite";
import {
type FreshViteConfig,
Expand Down Expand Up @@ -27,7 +48,11 @@ import { isBuiltin } from "node:module";
import { load as stdLoadEnv } from "@std/dotenv";
import path from "node:path";

// -- Types ----------------------------------------------------------

/** @category Types */
export type { FreshViteConfig };
/** @category Types */
export type {
ImportCheck,
ImportCheckDiagnostic,
Expand All @@ -41,6 +66,7 @@ export type {
*
* @param config Fresh config options
* @returns Vite plugin with Fresh support
* @category Plugin
*
* @example Basic usage
* ```ts vite.config.ts
Expand Down
Loading