Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.17 KB

README.md

File metadata and controls

41 lines (27 loc) · 1.17 KB

svelte-preprocess-budoux

npm version npm downloads

JSR JSR

Screenshot 2024-07-11 at 11 39 44

Configuration

You can choose svelte prerocessor or sveltekit hooks

Preprocessor

svelte.config.js

import { budouxPreprocess } from 'svelte-preprocess-budoux';

const config = {
	preprocess: [
		vitePreprocess(),
		budouxPreprocess({ language: 'ja' }),
	],
	// ... other svelte options
};

export default config;

SvelteKit hooks

hooks.server.js

import { budouxHandle } from 'svelte-preprocess-budoux';

export const handle = budouxHandle({ language: 'ja' });