Skip to content
These are temporary community docs. The official docs are in progress.Help improve them
Markless
Esc
↑↓navigate↵open⌘Jpreview
On this page

Configuration

The options for markless() and router() in vite.config.ts, and where Nitro configuration goes.

Last page, the build packed everything into .output/. This page lists the few options that change the build.

A new app has a two-item plugin list. Most apps never change it.

import { markless } from '@markless/core/vite';
import { router } from '@markless/router/vite';
import { defineConfig } from 'vite-plus';

export default defineConfig({
	plugins: [markless(), router()],
});

router() options

Option Default Effect
prefetch true false stops every early load, on hover, focus, press, or idle. Links still navigate.

markless() options

Option Default Effect
packing true false ships one file per module instead of a few packed chunks. The dev server never packs.

markless() has more options, such as debug and hmr. Treat them as advanced. They can change without notice.

Nitro configuration

Put Nitro configuration in a top-level nitro key. The router merges it into its own Nitro setup. The Markless website serves from a sub-path this way:

export default defineConfig({
	base: '/markless/',
	nitro: { baseURL: '/markless/' },
	plugins: [markless(), router()],
});

Plugin order with @markless/ui

If you use @markless/ui, put ui() from @markless/ui/vite before markless(). Otherwise the build stops with an error that tells you to move it.

plugins: [ui(), markless(), router()],

Next: What does @markless/ui give you? UI overview →

Was this page helpful?